Since you use RVM to manage your versions of Ruby, as you said in the comments, there is a simple solution: create a private package for this application and install only the version of the gem that you need in this kit.
Here's how you can do it:
1) Enter the directory of your application;
2) Enter the following command
rvm use ruby-2.4.0@your _app_name --ruby-version --create
(I assume you are using Ruby 2.4.0. If this is not your version, replace it accordingly in the command above.)
3) Install the supplier gem
gem install bundler
4) Make sure your Gemfile announces the version of the gem you need. In this case, it should have the line:
gem "json", "1.8.6"
5) Now run
bundle install
And you're done!
WARNING: This procedure ensures that json gem is version 1.8.6. But you may have problems with your bundle install if installing a different gem requires a newer version of json gem . In this case, you will have to resolve this conflict differently.
To learn more about the different packages for different applications, read this .
Hope this helps.
source share