How do you update the JRuby gem command?

How do we update the gem version that JRuby uses?

JRuby uses gem (1.5.1), and we would like to update it to 1.8.7. We want the stones to be 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 also does not work)

 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 I install / upgrade gem (1.8.5)?

Configuration:

  • using Maven to install JRuby.
  • JRuby is installed at: ~ / .m2 / repository / org / JRuby / JRuby-full / 1.6.3 / JRuby-full-1.6.3.jar
  • jruby-complete-1.6.3.jar is NOT blown up.
  • jruby-complete-1.6.3.jar built the gem command in it (1.5.1).
  • The bin/jruby 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:

(okr)

 GEM_HOME=~/tools/ruby/gems GEM_PATH=~/tools/ruby/gems 
+4
source share
2 answers

If you can get update_rubygems to work, thatโ€™s fine, but keep in mind that this may cause some JRuby extensions to no longer work (e.g. maven integration). We supply RubyGems with JRuby releases to ensure that our extensions are compatible with the version we are sending.

+4
source

After rubygems-update , you need to run the command:

 jruby -S update_rubygems 

From now on, you should be able to use the usual command, i.e.

 jruby -S gem update --system 
0
source

All Articles