Peepcode sponsors akitaonrails.com Locaweb sponsors akitaonrails.com

Xmas Gift: Ruby 1.9 Coverage!

AkitaOnRails / 25.Dec.2007 at 07:56pm


New Official Logo

According to this article Matz should release Ruby 1.9 TODAY!! Probably around 1AM EST.

Anyone interested in what´s new at Ruby 1.9 should follow the eigenclass blog. He´s been tracking the changes for 2 years not using a mechanized script procedure to analyze the CHANGELOGS. That´s 50k lines of processed text lines!

Merry Christmas!

Update 12/25: Exactly as we said yesterday, Matz officially announced Ruby 1.9. Se also here, here and here And the first question everybody´s gonna ask is “does Rails 2.0 runs over Ruby 1.9?” and the short answer being No. Neither Rails, nor Mongrel (Jeremy Kemper seems to believe that it´s almost there), not dozens of gems are ready yet. Ruby 1.9.1 seems to be just around the corner as well. All gem developers need to re-test and modify their codes taking into account what has been deprecated and which sintaxes changed. Wait a little bit more before attempting Rails with Ruby 1.9.

Update 2 12/25: This presentation should help you get up to speed on the newest features of Ruby 1.9. Keep in mind that 1.9 is an odd release – tagged experimental – and the next version, 2.0, is the one that´s gonna be held stable, same way that happened for 1.8 and 1.6. Do not expect to run projects in production with 1.9 so soon, but this gives us the necessary time to adjust to the differences with the now older version.



Summarizing? New lambda/block syntax, more splats, new Enumerator, subtle differences with Modules, Unicode support (finally!), new asynchronous I/O. Then again, the best source to research what´s changed is Eigenclass and, of course, the soon to be released Dave Thomas Pickaxe: “the” definitive Ruby 1.9 reference.

Update 12/26: Exactly as I recommended and is well known, 1.9 is an experimental version. Dave Thomas reminds us again that this is intended for anyone interested in experiments, upgrade gem code, etc but this is not intended as a drop-in replacement for 1.8. There are still known bugs that will be squashed in the next few months before we finally have a stable 2.0 release.

Update 12/27: This is an old post but it explained well how to install Ruby 1.9 without breaking your existing 1.8 (though I still recommend using some virtual machine to test experimental stuff). It basically goes like this (updated to the new 1.9 tag):


svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_9_0_0/ ruby19
pushd ruby19
autoconf
./configure --prefix=/usr/local --program-suffix=19 --with-readline-dir=/usr/local
make
sudo make install
popd

Chris Shea explained this well: Certainly, old hands have this down, and much of this is in the README. But the secret is—program-suffix=19, which leaves ruby alone and gives you ruby19 as your 1.9 executable.

1 Comment

You’re my new hero! thanks for taking the time for posting this. And Merry Christmas. :)

Leave a Comment