Local gems installing ruby not jruby

I have jruby installed at /home/david/apps/jruby and is not set in
.bash_profile. I do have ruby set at /home/david/apps/ruby/bin in
.bash_profile.

I created a hello world gem.

/home/david/apps/jruby/bin/jruby -S rake install
test 0.0.1 built to pkg/test-0.0.1.gem
test (0.0.1) installed

then

/home/david/apps/jruby/bin/jruby -S gem list --local

*** LOCAL GEMS ***

bundler (1.0.22)
diff-lcs (1.1.3)
em-proxy (0.1.6)
eventmachine (0.12.10 java)
http_parser (0.1.3)
json (1.5.0 java)
json-jruby (1.5.0 java)
macaddr (1.6.0)
nokogiri (1.5.0 java)
rake (0.9.2.2)
rspec (2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
rspec-mocks (2.8.0)
sources (0.0.1)
systemu (2.2.0)
uuid (2.3.5)

Not there but it does show up with

david@linux-8h1y:~/projects/greyfox/test> ruby -S gem list --local

*** LOCAL GEMS ***

...
test (0.0.1)
...

What am I missing? It is driving me nuts. Please do not recommend RVM, I
have had nothing but headaches with that hacked-up mess.

If you have environment variables set for GEM_HOME, etc, JRuby will
honor them and probably not install in JRuby’s location. I don’t know
what your rake install target actually does, but my first guess
would be that there’s some environment oddity.

  • Charlie

On Fri, May 25, 2012 at 4:08 PM, Random Programmer