# Upgrading released JRuby versions to rubygems 1.2

**URL:** <https://www.ruby-forum.com/t/upgrading-released-jruby-versions-to-rubygems-1-2/141506>\
**Category:** JRuby\
**Created:** [June 26, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/upgrading-released-jruby-versions-to-rubygems-1-2/141506 "2008-06-26T15:08:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vovka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a87d85/32.png) [@vovka](https://www.ruby-forum.com/u/vovka)\
**Post date:** [June 26, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/upgrading-released-jruby-versions-to-rubygems-1-2/141506/1 "2008-06-26T15:08:56Z")

</div>

Hi folks,

By now you’ve probably heard some good news about rubygems 1.2, about  
its major speed up and significant reduction of memory requirements  
(for me the memory use dropped from 600Mb to 40Mb!). JRuby 1.1.3 will  
come with rubygems 1.2. But chances are you tried to upgrade your  
previously released version of JRuby with new rubygems.

There are a couple of issues to be aware if you’d like to upgrade the  
rubygems manually. Historically, JRuby has always had a small  
number of customization/patches oven the stock rubygems and upgrading  
to the stock version of rubygems 1.2 will remove them. See below on  
how this is going to be resolved going forward.

1. jruby -S gem update --system - this standard command to upgrade  
the rubygems just doesn’t work with JRuby 1.1.2,  
due to bug in rubygems 1.1.1. Luckily, there is a workaround:

2. _IMPORTANT_: There are some incompatible changes in stock rubygems  
1.2, the most important one is  
the change of the place where the gems are stored.  
If you invoke jruby -S gem env, look at GEM PATHS value (it will  
have something like jruby-1.1.2/lib/jruby,  
instead of previous location: jruby-1.1.2/lib/ruby, basically  
gems will be in lib/jruby subdir instead of lib/ruby one).

Luckily, rubygems 1.2 provides some new means to customize the  
behavior depending on Ruby implementation, looking  
into #{RUBY\_ENGINE}.rb file, in JRuby case that would be jruby.rb.

I strongly encourage you to pick jruby.rb file from the subversion  
repository and place where needed: in  
YOUR\_JRUBY\_DIR/lib/ruby/site\_ruby/1.8/rubygems/defaults/jruby.rb

The content of the file can be obtained here:  
[http://svn.jruby.codehaus.org/browse/~raw,r=7035/jruby/trunk/jruby/lib/ruby/site\_ruby/1.8/rubygems/defaults/jruby.rb](http://svn.jruby.codehaus.org/browse/~raw,r=7035/jruby/trunk/jruby/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb)

To verify that the file is in proper location, invoke jruby -S gem env  
and take a look at GEM PATHS value, it should be back  
to lib/ruby/gems, and also verify that RUBY EXECUTABLE is jruby.bat,  
not jruby.bat.exe (on Windows).

1. Process.uid raises an exception on Windows, but this method is  
needed by rubygems 1.2.  
Again, if you have obtained jruby.rb file from above, this issue  
should be resolved.

Thanks,  
–Vladimir

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![vovka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a87d85/32.png) [@vovka](https://www.ruby-forum.com/u/vovka)\
**Post date:** [June 27, 2008, 1:46am UTC](https://www.ruby-forum.com/t/upgrading-released-jruby-versions-to-rubygems-1-2/141506/2 "2008-06-27T01:46:50Z")

</div>

Thanks very much for the walkthrough and update, Vladimir. I’ve started  
including RubyGems 1.2 as a 1.1.3 bullet in my talks here.

Vladimir S. wrote:

> number of customization/patches oven the stock rubygems and upgrading  
> command listed above.  
> “disappear”, since they are in the old place.  
> [http://svn.jruby.codehaus.org/browse/~raw,r=7035/jruby/trunk/jruby/lib/ruby/site\_ruby/1.8/rubygems/defaults/jruby.rb](http://svn.jruby.codehaus.org/browse/~raw,r=7035/jruby/trunk/jruby/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb)
> 
> Thanks,  
> –Vladimir
> 
> * * *
> 
> To unsubscribe from this list, please visit:
> 
> ```
> http://xircles.codehaus.org/manage_email
> 
> ```

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```
