Ruby 1.9 and gems

Hi!

I’d like to try Ruby1.9 on some of my projects but I’m not sure how it
gels with the existing
Ruby install. How do I install gems for 1.9? Do most of the gems even
work under 1.9?
Specifically, I need ActionPack.

Les

On Sat, Jun 7, 2008 at 2:35 PM, Leslie V. [email protected]
wrote:

I’d like to try Ruby1.9 on some of my projects but I’m not sure how it
gels with the existing
Ruby install. How do I install gems for 1.9? Do most of the gems even
work under 1.9?
Specifically, I need ActionPack.

It can live alongside your 1.8 install. Configure with a program
suffix so the ruby executables are easily distinguished. For example,
./configure --program-suffix=1.9 will result in ruby1.9, irb1.9,
gem1.9 (RubyGems is bundled with 1.9)

make and install then gem1.9 install whatever. Most work fine with
1.9 with minor tweaks. Rails 2.1 is compatible.

Best,
jeremy

On Saturday 07 June 2008 16:35:49 Leslie V. wrote:

Hi!

I’d like to try Ruby1.9 on some of my projects but I’m not sure how it
gels with the existing
Ruby install.

Ubuntu installed it as a ruby1.9 command, and gem1.9, etc. In theory, it
should work.

Unfortunately, it does occasionally cause stupidity – for example, I’ll
have
rake installed for ruby1.9, and a rake task will end up calling ruby1.9
by
name, as part of trying to install a ruby1.8 gem (doesn’t work, needless
to
say).

I suspect that there’s a way to get them to cooperate short of
virtualization,
though.

Do most of the gems even
work under 1.9?

Most I’ve tried have worked.

Specifically, I need ActionPack.

I think someone has made it work. I’m fairly sure it doesn’t out of the
box.

On Jun 7, 2008, at 14:49 PM, David M. wrote:

should work.
virtualization,
though.

Add --format-executable to the install command line. (You can set
this in ~/.gemrc too.)

On Sat, Jun 7, 2008 at 2:49 PM, David M. [email protected]
wrote:

Specifically, I need ActionPack.

I think someone has made it work. I’m fairly sure it doesn’t out of the box.

It works out of the box.

Best,
jeremy

On Saturday 07 June 2008 21:53:23 Jeremy K. wrote:

On Sat, Jun 7, 2008 at 2:49 PM, David M. [email protected] wrote:

Specifically, I need ActionPack.

I think someone has made it work. I’m fairly sure it doesn’t out of the
box.

It works out of the box.

Yes, apparently I spoke too soon.

Pre-2.1 did have problems out of the box, though.

I located gem1.9, actually expected it before and missed it.
Playing with IRB1.9, some of the improvements look really interesting!

“”.methods returns symbols now. No more crazy string[5] returning an
integer!
And the speed, wahooo!

I just can’t gdiff’s C extension to compile, which is probably because
of string
changes. I’ll have a go at fixing it.

Les

On Sat, Jun 7, 2008 at 10:16 PM, David M. [email protected]
wrote:

Pre-2.1 did have problems out of the box, though.

Yup. Lots of Enumerable and string encoding changes, plus a fix for
[ruby-core:14716].

jeremy

Nevermind, I got the .tar.bz2 file for the gem, changed it and rebuilt
the gem
that way. Seems to work!

On Sun, Jun 8, 2008 at 10:08 AM, Leslie V.
[email protected] wrote:

I located gem1.9, actually expected it before and missed it.
Playing with IRB1.9, some of the improvements look really interesting!

“”.methods returns symbols now. No more crazy string[5] returning an integer!
And the speed, wahooo!

I just can’t gdiff’s C extension to compile, which is probably because of string
changes. I’ll have a go at fixing it.

Ok I fixed the extension but how do I repackage my changes to the gem so
that they can be installed properly? If I fix the source as “gem”
suggests and
run “gem install” again, it refetches the old gem and overwrites my
changes.

Les