bundle exec - You have already activated json X, but your Gemfile requires json Y bundle exec - You have already activated json X, but your Gemfile requires json Y json json

bundle exec - You have already activated json X, but your Gemfile requires json Y


A bit late to the game, but hey, I have a solution! this is how I did it: so besides looking in your standard place where gems are installed, there is one other place where gems can apparently be "defined", and brought into the system. I install stuff using rbenv (I recommend this over RVM), and these are the directories for me:

/home/jf/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/home/jf/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/specifications/default

In your case, your exact location/s might be different, but you should be able to figure it out. If a gem is in the standard place (/home/jf/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems), you would be able to 'gem uninstall' without a problem. For the other location, though... tough. To simply prevent the system version from being recognized so that you can use the version from the Gemfile, simply move the json-X.gemspec file away from that second directory (/home/jf/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/specifications/default above) somewhere else. And that's it!


I had the same problem yesterday. I am not an expert but the following worked for me:

I created a new website with Jekyll using:

$ jekyll new "name_site" 

I then copied the new GemFile and GemFile.lock from the new folder to the older (where you have a problem). Then, you run:

$ jekyll serve 

in the folder of your current website and it should work. Let me know if it works for you!