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!