Search code examples
rubygemsjrubytorquebox

How do gems built for java work? Getting error install torquebox gem


I'm clearly missing something here. I'm trying to install the torquebox gems and am running into this error (on a mac):

gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/    

Could not find a valid gem 'torquebox-server' (>= 0), here is why:
          Found torquebox-server (2.x.incremental.424), but was for platform java

I have jruby installed, version 1.6.3. It's in my path. I don't understand the above error. If you need any more info let me know.


Solution

  • Marc:

    It looks like it is using the MRI version of gem. If JRuby is in your path, try:

    jruby -S gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
    

    You may also need to run the torquebox command via JRuby explicitly as well:

    jruby -S torquebox deploy .
    jruby -S torquebox run
    

    Also, you should upgrade to JRuby 1.6.4 if possible - it fixes a few issues that we encountered in 1.6.3, and is what we currently test TorqueBox with.