One stupid question

In jruby-1.5.6.tar.gz is included ruby 1.8 or ruby 1.9?

On 2011-01-29, at 13:24, Mauro wrote:

In jruby-1.5.6.tar.gz is included ruby 1.8 or ruby 1.9?

JRuby 1.5.6 is both Ruby 1.8.7 and Ruby 1.9.1 compatible, but only the
1.8.7 mode is recommended, I think.

JRuby 1.6.0 is the “Ruby 1.9.2 compatible now” release. It is in
release candidate now, and I think a release is not so far away. The
release candidate is very stable. For Ruby 1.9 development, I would
recommend using the JRuby 1.6.0RC1 release, and report any issues you
have at http://jira.codehaus.org/browse/JRUBY

JRuby 1.6.0 has added the Ruby 1.9.2 standard library, so I guess it is
missing in the 1.5.6 release?


With kind regards
Uwe K.
Kubosch Consulting
[email protected]
http://kubosch.no/

On 29 January 2011 14:15, Uwe K. [email protected] wrote:

On 2011-01-29, at 13:24, Mauro wrote:

In jruby-1.5.6.tar.gz is included ruby 1.8 or ruby 1.9?

JRuby 1.5.6 is both Ruby 1.8.7 and Ruby 1.9.1 compatible, but only the 1.8.7
mode is recommended, I think.

What doen it mean 1.9.1 compatible?
I can code using ruby 1.9.1 syntax?

On 2011-01-29, at 14:42, Mauro wrote:

In jruby-1.5.6.tar.gz is included ruby 1.8 or ruby 1.9?
JRuby 1.5.6 is both Ruby 1.8.7 and Ruby 1.9.1 compatible, but only the 1.8.7
mode is recommended, I think.
What doen it mean 1.9.1 compatible?
I can code using ruby 1.9.1 syntax?

Yes. However, many things have been improved in the 1.6.0RC1 release,
and the Ruby 1.9.2 standard library has been added.


With kind regards
Uwe K.
Kubosch Consulting
[email protected]
http://kubosch.no/

On 29 January 2011 23:56, Nick K. [email protected] wrote:

PS C:\mydocs> jruby --1.8 -e “puts ?c”
99
PS C:\mydocs> jruby --1.9 -e “puts ?c”
c

But when I develop a rails application with jruby, I’m using by
default 1.8 or 1.9?

Yes, and to code using 1.9 syntax, you just pass --1.9 to the
command-line:

$> jruby -h

will show a lot of options, but the one that you might be interested in
is
–1.9:

PS C:\mydocs> jruby -h
Usage: jruby [switches] [–] [programfile] [arguments]
… Lots of options
–1.9 specify Ruby 1.9.x compatibility
… more options

So to run something in 1.9 mode, you just add --1.9 to the options list.

PS C:\mydocs> jruby --1.8 -e “puts ?c”
99
PS C:\mydocs> jruby --1.9 -e “puts ?c”
c

On 2 February 2011 12:13, Nick K. [email protected] wrote:

It’s 1.8 by default, but you can check. Here’s my computer:
PS C:> jruby -v
jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java
HotSpot™ Client VM 1.6.0_23) [Windows XP-x86-java]
then, when you pass the --1.9 flag:
PS C:> jruby --1.9 -v
jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java
HotSpot™ Client VM 1.6.0_23) [Windows XP-x86-java]

Do you use windows?
Arghhhhh :slight_smile:
However here is my pc:

jruby -v
jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847)
(OpenJDK 64-Bit Server VM 1.6.0_18) [linux-amd64-java]

It’s 1.8.
How to use 1.9 by default?
It is advisable to use 1.9 to develop rails applications?

http://stackoverflow.com/questions/4755900/how-to-make-jruby-1-6rc1-default-to-ruby-1-9

It’s 1.8 by default, but you can check. Here’s my computer:

PS C:> jruby -v
jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java
HotSpot™ Client VM 1.6.0_23) [Windows XP-x86-java]

then, when you pass the --1.9 flag:

PS C:> jruby --1.9 -v
jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java
HotSpot™ Client VM 1.6.0_23) [Windows XP-x86-java]

-Nick

On 2 February 2011 12:58, Nick K. [email protected] wrote:

http://stackoverflow.com/questions/4755900/how-to-make-jruby-1-6rc1-default-to-ruby-1-9

Why jruby doesn’t use ruby1.9 by default?
Is ruby1.9 considered not totally stable?

On 2 February 2011 12:58, Nick K. [email protected] wrote:

http://stackoverflow.com/questions/4755900/how-to-make-jruby-1-6rc1-default-to-ruby-1-9

Sorry for my distraction, there was google for this :slight_smile:

On 2 February 2011 15:35, Chuck R. [email protected] wrote:

I think 1.8 mode is still the default because most Ruby code out there still
expects that.

Some gems don’t work with ruby 1.9, for example I’ve installed redcar
using jruby --1.9 but it doens’t work so I’ve come back to 1.8.

On Feb 2, 2011, at 9:25 AM, Mauro wrote:

On 2 February 2011 12:58, Nick K. [email protected] wrote:

http://stackoverflow.com/questions/4755900/how-to-make-jruby-1-6rc1-default-to-ruby-1-9

Why jruby doesn’t use ruby1.9 by default?
Is ruby1.9 considered not totally stable?

JRuby has had 1.9 support since the 1.5.x release series but it was
incomplete. It should be complete for the 1.6 release.

I think 1.8 mode is still the default because most Ruby code out there
still expects that. If you need 1.9, just switch into that mode. It
should be totally stable. If you find a problem, file a bug.

cr

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs