views:

441

answers:

1

Has anyone used rake gems:install under jruby? running sudo jruby -S rake gems:install --trace give me the following output:

** Invoke gems:install (first_time)
** Invoke gems:base (first_time)
** Execute gems:base
** Invoke environment (first_time)
** Execute environment
** Execute gems:install gem install reek

For more information on reek, see http://wiki.github.com/kevinrutherford/reek 
Successfully installed reek-1.2.1 
1 gem installed 
Installing ri documentation for reek-1.2.1... 
Installing RDoc documentation for reek-1.2.1... 
gem install ci_reporter 
Successfully installed ci_reporter-1.6.0 
1 gem installed 
Installing ri documentation for ci_reporter-1.6.0... 
Installing RDoc documentation for ci_reporter-1.6.0...

All seems well, except that the gems are not installed. jruby -S gem list shows no record of them and a locate for these gems shows nothing.

Here's my setup:

OSX 10.5.8
jruby 1.1.6 (installed with macports, yes I know it's not current)
Rails 2.2.2

Does anyone know if this is a known issue, or if there's a different command I should be issuing to install gems through the rails rake command with jruby? I couldn't find anything on the web.

A: 

I did a sanity check using:

jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-08 6586) (Java HotSpot(TM) 64-B
it Server VM 1.6.0_16) [amd64-java]

I was able to create a rails app, modify the config to include the hpricot gem, and successfully run jruby -S rake gems:install and jruby -S rake gems.

As a first step for your environment, get the latest 1.40 release, modify your $PATH to point to the newer release and see if you can recreate the problem.

Dylan McClung
I also just tried with jruby 1.4 and it does work, so this must be 1.2 specific. That's not really helpful though just to say "fetch the latest". Not many production environments just willy nilly upgrade to the version of a language.
brad