8

I am trying to configure JRuby using RVM on Ubuntu Linux. I have successfully installed RVM, but when trying to install Jruby, I get the following error:

dlitwak@ubuntu:~$ rvm install jruby-1.6.0
jruby-1.6.0 - #fetching 
jruby-1.6.0 - #extracted to /home/dlitwak/.rvm/src/jruby-1.6.0 (already extracted)
Building Nailgun
jruby-1.6.0 - #installing to /home/dlitwak/.rvm/rubies/jruby-1.6.0
**ERROR: Cannot switch to 1.6.2 for this interpreter.**
jruby-1.6.0 - #importing default gemsets (/home/dlitwak/.rvm/gemsets/)
Copying across included gems
Building native extensions.  This could take a while...
Successfully installed jruby-launcher-1.0.7-java
1 gem installed
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
dlitwak
  • 1,559
  • 2
  • 12
  • 14
  • update: I proceeded and hoped it would work, and so far it has. Seems like this may be an unnecessary error. – dlitwak Jun 02 '11 at 22:43
  • 1
    Try deleting your jruby-1.6.0 directory and reinstalling jruby 1.6.0. `rm -rf /home/dlitwak/.rvm/src/jruby-1.6.0 && rvm install jruby-1.6.0` – Chris Ledet Jun 17 '11 at 20:33

1 Answers1

2

I searched through the RVM source code, and the only occurrence of "for this interpreter" I could find was in rvm/scripts, where the following is:

case "$rvm_ruby_string" in
  jruby*|goru*|maglev*)
    install=0
    ;;
  *)
    install=1
    ;;
esac

if (( install == 0 ))
then
  rvm_error "Cannot switch to RubyGems ${version} for this interpreter."
  exit 1
fi

So it seems like that error will always show up for JRuby, which leads me to believe it's more of a warning than an error.

sarahhodne
  • 9,796
  • 3
  • 39
  • 44
  • The code you pasted isn't related. Note the "RubyGems ${version}" which does not appear in the output. – Zr40 Jul 09 '11 at 10:51
  • 2
    Actually, I think it is. The "RubyGems" part of it was added on June 21 (see https://github.com/wayneeseguin/rvm/commit/38e22c3a4d4bff9bea67d2116bbeccd0e2fd815c), which is over a month after the question was asked. – sarahhodne Jul 09 '11 at 13:09