JRuby upgrading query

Hi, JRuby newbie here.

I installed version 1.6.1 a few weeks ago and have several dozen gems
installed (all on the 1.8.7 version of ruby). My main interest is in
using JRuby with Android.

What is the most efficacious way to upgrade from JRuby 1.6.1 to 1.6.2?
(I don’t believe I need to retain both.)

Should I uninstall 1.6.1? Should I install 1.6.2 over 1.6.1 by
choosing the previously established directory (in my case: c:
\jruby161)?

I don’t see any instructions on the JRuby site indicating how to
upgrade without also re-installing gems one by one, and the default
behavior of the installer creates a new directory for JRuby.

Thanks for advice!

Also: I’ve been leaning on David Black’s “The Well-Grounded Rubyist,”
which restricts itself to Ruby 1.9. Without realizing it, all the
exploring I’ve done so far in JRuby has been with the 1.8.7 arm, and I
infer from general commentary that its pool of gems is larger than
that for JRuby’s 1.9.2 arm. Is that so? If not (or if not
significantly), are there strong reasons to prefer 1.9.2 or 1.8.7 for
starting out with JRuby?

Thank you again.

Roger S

– *
rsperberg at gmail
*

Roger S. [email protected] wrote on 06/02/2011 07:37:38 AM:

Hi, JRuby newbie here.

Welcome!

What is the most efficacious way to upgrade from JRuby 1.6.1 to 1.6.2?
(I don’t believe I need to retain both.)

Most people swear by tools like RVM and pik. If you’re developing on
Linux or a Mac, then use RVM. Otherwise, use pik on Windows.

These tools make it very easy to install and use multiple version of
Ruby and Jruby for development purposes. Also, I believe both tools
make it easy to use the same gems with multiple versions of Ruby. You’ll
need to check the docs for each tool to see how they help you manage
your gems.

Should I uninstall 1.6.1? Should I install 1.6.2 over 1.6.1 by
choosing the previously established directory (in my case: c:
\jruby161)?

Just install both. Here’s all of the rubies that I’m managing with pik
on my XP box:

PS F:\scripts> pik list
  131: jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java

HotSpot™ …
140: jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3)
(Java H…
150: jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999)
(Java H…
* 160: jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154)
(Java H…
186: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
187: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]

I don’t see any instructions on the JRuby site indicating how to
upgrade without also re-installing gems one by one, and the default
behavior of the installer creates a new directory for JRuby.

If you don’t use some sort of helper app for this sort of thing, then
yes, you’ll have to install them all one-by-one. However, tools like
bundler can also help with this task.

Also: I’ve been leaning on David Black’s “The Well-Grounded Rubyist,”
which restricts itself to Ruby 1.9. Without realizing it, all the
exploring I’ve done so far in JRuby has been with the 1.8.7 arm, and I
infer from general commentary that its pool of gems is larger than
that for JRuby’s 1.9.2 arm. Is that so? If not (or if not
significantly), are there strong reasons to prefer 1.9.2 or 1.8.7 for
starting out with JRuby?

This is a pretty big question. Yes, there are more gems for the 1.8.x
branch of Ruby, and also more “general support”. However, this will
change soon enough.

If there’s nothing keeping you on the 1.8.x branch, then I recommend
using the 1.9.x branch. This will make your code more “future-proof”.
Also, if you want to run anything on top of CRuby, then it will probably
perform better.

HTH!

Tom Purl

On 2 June 2011 16:00, Tom E Purl [email protected] wrote:

Linux or a Mac, then use RVM. Otherwise, use pik on Windows.

(Java H…
yes, you’ll have to install them all one-by-one. However, tools like
This is a pretty big question. Yes, there are more gems for the 1.8.x
branch of Ruby, and also more “general support”. However, this will
change soon enough.

If there’s nothing keeping you on the 1.8.x branch, then I recommend
using the 1.9.x branch. This will make your code more “future-proof”.
Also, if you want to run anything on top of CRuby, then it will probably
perform better.

I’ve experimented that rails with jruby -v 1.9 doesn’t work well.

On 2011-06-02, at 14:37, Roger S. wrote:

Hi, JRuby newbie here.

Welcome!

I installed version 1.6.1 a few weeks ago and have several dozen gems
installed (all on the 1.8.7 version of ruby). My main interest is in
using JRuby with Android.

Have you looked at Ruboto?

http://ruboto.org/

Hope to see you there!


With kind regards
Uwe K.
Kubosch Consulting
[email protected]

Roger S. wrote in post #1002758:

What is the most efficacious way to upgrade from JRuby 1.6.1 to 1.6.2?
(I don’t believe I need to retain both.)

I am also using JRuby on Windows, and this is what I do:

Download the JRuby .zip file (not the .exe), simply unzip somewhere,
like in “C:”, and you will get a “C:\jruby-1.6.2” directory. Now add
C:\jruby-1.6.2\bin" to your PATH, and JRuby is ready to run. When
upgrading, do the same thing and simply update the PATH to the new
installation directory.

Note: You may have to set JAVA_HOME if it is not already set.

I don’t see any instructions on the JRuby site indicating how to
upgrade without also re-installing gems one by one, and the default
behavior of the installer creates a new directory for JRuby.

I keep the Gems repository separate from the JRuby installation
directory by setting two environment variables, like this:

set GEM_HOME=C:\jruby-gems
set GEM_PATH=C:\jruby-gems

Also add “C:\jruby-gems\bin” to your PATH.

All Gems will now be installed in and loaded from this location, and the
Gem repository within the JRuby installation directory will not be used.
Upgrading JRuby will have no effect on the Gems repository.

Hope this helps.

Claus

Tom,

Thank you for taking the time not just to answer my questions but to
describe the implications of following one course or another.

This is really helpful!

Roger

Yes, I have, with great delight!

I’m not moving rapidly, but most of my attention is placed directly on
Ruboto. I hope I can help with the tutorials and documentation (and
specifically from the weekend developer perspective).

Thank you for your industrious work on Ruboto!

Roger

On 2011-06-03, at 22:31, Roger S wrote:

Yes, I have, with great delight!

I’m not moving rapidly, but most of my attention is placed directly on
Ruboto. I hope I can help with the tutorials and documentation (and
specifically from the weekend developer perspective).

Thank you for your industrious work on Ruboto!

Have you joined the mailing list? If not, please do. I am especially
looking forward to see your work on the tutorials. They are the gateway
to Ruboto for new users.


Uwe K.
Systems Developer
Datek Wireless AS
[email protected]

This would seem to be of major importance for what must the major
driver bringing new users to Ruby. However, I’m not one of them; I
have no Rails projects planned nor any need of Rails at present.
There’s no way for you to have known that, so I thank you for your
consideration in alerting me.

Roger