加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-17 01:19:05 所属栏目:百科 来源:网络整理
导读:我试图在Ubuntu Linux上使用RVM配置J Ruby.我已成功安装RVM,但在尝试安装Jruby时,出现以下错误: dlitwak@ubuntu:~$rvm install jruby-1.6.0jruby-1.6.0 - #fetching jruby-1.6.0 - #extracted to /home/dlitwak/.rvm/src/jruby-1.6.0 (already extracted)Bu
我试图在Ubuntu Linux上使用RVM配置J Ruby.我已成功安装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

解决方法

我搜索了RVM源代码,我能找到的唯一出现的“for this interpreter”是在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

所以看起来这个错误总会出现在JRuby上,这让我相信它更像是一个警告而不是一个错误.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读