你如何更新JRuby的gem命令? [英] How do you update JRuby's gem command?

查看:382
本文介绍了你如何更新JRuby的gem命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何更新JRuby使用的gem版本?



JRuby使用gem(1.5.1),我们希望升级到1.8.7。我们希望将宝石安装在Ruby /宝石中



我们运行:

  bin / jruby gem install ruby​​gems-update 
获取:rubygems-update-1.8.5.gem(100%)
成功安装rubygems-update-1.8.5
安装了gem

bin / jruby gem install --system
错误:执行gem时(OptionParser :: InvalidOption)
无效选项: - 系统

(更新无效)

  bin / jruby gem update --system 
更新RubyGems
更新RubyGems为1.8.5
安装RubyGems 1.8.5
错误:执行gem ...( Errno :: EBADF)
错误的文件描述符 - 错误的文件描述符

更新宝石(1.8.5)?

配置:


  • 使用Maven安装JRuby。

  • JRuby安装在:
    〜/ .m2 / repository / org / jruby / jruby-complete / 1.6。 3 / JRuby的COMPLE te-1.6.3.jar
  • jruby-complete-1.6.3.jar不会爆炸。

  • jruby-complete-1.6.3。 jar已经建立了gem(1.5.1)命令。

  • 命令 bin / jruby 看起来像这样:



(bin / jruby)

  export jruby_build = 1.6.3 
export GEM_HOME =〜/ tools / ruby​​ / gems
java -jar〜/ .m2 / repository / org / jruby / jruby-complete / $ {jruby_build} / jruby-完成 - $ {jruby_build} .jar -S $ *




  • 环境变量:



(env)

  GEM_HOME =〜/ tools / ruby​​ / gems 
GEM_PATH =〜/ tools / ruby​​ / gems


如果您可以使update_rubygems正常工作,那很好,但请注意,这可能会导致一些JRuby特定的扩展无法继续工作(例如maven集成)。我们向JRuby发布了RubyGems,以便我们确保我们的扩展与我们发布的版本兼容。


How do we update the version of gem that JRuby uses?

JRuby uses gem (1.5.1) and we would like to upgrade it to 1.8.7. We want to have the gems installed in Ruby/gems

We run:

bin/jruby gem install rubygems-update
Fetching: rubygems-update-1.8.5.gem (100%)
Successfully installed rubygems-update-1.8.5
1 gem installed

bin/jruby gem install --system
ERROR:  While executing gem ... (OptionParser::InvalidOption)
invalid option: --system

(update does not work either)

bin/jruby gem update --system
Updating RubyGems
Updating RubyGems to 1.8.5
Installing RubyGems 1.8.5
ERROR:  While executing gem ... (Errno::EBADF)
Bad file descriptor - Bad file descriptor

How can the install/update of gem (1.8.5) be done?

Configuration:

  • using Maven to install JRuby.
  • JRuby is installed at: ~/.m2/repository/org/jruby/jruby-complete/1.6.3/jruby-complete-1.6.3.jar
  • jruby-complete-1.6.3.jar is NOT exploded.
  • jruby-complete-1.6.3.jar has built the "gem" (1.5.1) command into it.
  • command bin/jruby that looks like this:

(bin/jruby)

export jruby_build=1.6.3
export GEM_HOME= ~/tools/ruby/gems
java -jar ~/.m2/repository/org/jruby/jruby-complete/${jruby_build}/jruby-complete-${jruby_build}.jar -S $*

  • Environment variables:

(env)

GEM_HOME=~/tools/ruby/gems
GEM_PATH=~/tools/ruby/gems

解决方案

If you can get update_rubygems to work, that's fine, but be aware that this may cause some JRuby-specific extensions to no longer work (e.g., maven integration). We ship RubyGems with JRuby releases so that we can ensure our extensions are compatible with the version we ship.

这篇关于你如何更新JRuby的gem命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆