对于此解释器错误rvm,JRuby无法切换到1.6.2

dli*_*wak 8 ruby jruby rvm

我试图在Ubuntu Linux上使用RVM配置JRuby.我已成功安装RVM,但在尝试安装Jruby时,出现以下错误:

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

sar*_*dne 2

我搜索了 RVM 源代码,我能找到的唯一出现的“for thisterpreter”是在 中rvm/scripts,其中如下:

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
Run Code Online (Sandbox Code Playgroud)

因此,对于 JRuby 来说,该错误似乎总是会出现,这让我相信这更多的是警告而不是错误。

  • 事实上,我认为是的。其中的“RubyGems”部分于 6 月 21 日添加(请参阅 https://github.com/wayneeseguin/rvm/commit/38e22c3a4d4bff9bea67d2116bbeccd0e2fd815c),距问题提出一个多月了。 (2认同)