This question has two parts:
- I installed JRuby using rvm today, install went fine. I also
have Ruby 1.9.3 installed on my system. Is there an easy way to
re-install the same gems I have in 1.9.3 into JRuby? -
I attempted to install the json gem in JRuby. First I switched from
my default Ruby to JRuby by doing:rvm jruby(and checked to make
sure I was using jruby by doingrvm current). Then I didjruby. It sucessfully installed:
-S gem install jsonSuccessfully installed json-1.7.5-javaBut when I do
gem list(orjruby -S gem list), I just get the gems that were installed when JRuby was installed. I tried exiting the terminal, and doing gem list again, but it still does not show.
Any help is appreciated. Thanks
UPDATE
I found that the gempath in gem env is not the same as where the gems are being installed. How do I add another new gempath to this list (in bash)? or preferably how do I ensure the gems are being installed in the correct GEM PATH?
Since I used rvm to install jruby, I used this to install the gem in the correct location: