Jim Lindley Notes

January: Month of Ruby 1.9

January 10th, 2008

[UPDATE: I’ve been terribly sick the last week so this series is delayed a bit, sorry!]

In January I’ll be running a series of posts – one each weekday – highlighting a new feature or change in Ruby 1.9, which had a developer release on Christmas Day. While Ruby 1.9 should not yet be used in production, it is now the perfect time to install it alongside 1.8 and get your hands dirty.


Getting Ruby 1.9


On a Linux/Unix/Mac installation should be straightforward if you are used to compiling packages.

Download:

mkdir ~/src
cd ~/src  
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
# or curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
tar xzvf ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz

Install:

cd ruby1.9.0-0
autoconf
./configure --prefix=/usr/local --program-suffix=19
make
sudo make install

Now in addition to ruby, irb, and ri you should have available to you ruby19, irb19, and ri19.

Start up irb19 and check the ruby version:

jlindley$ irb19
>> RUBY_VERSION
=> "1.9.0"

Don’t expect to be able to run Rails and all your usual programs as normal, there is still a lot of work going on updating Rails and other gems to be 1.9 compatible. This release breaks some old things, but going forward 2.0 and further should all be compatible with 1.9. This is the painful release.

So, install 1.9 and check back on January 1st for the first entry in this series. In the meantime, a summary of changes in 1.9 can (sometimes) be found at Eigenclass.org.


Series Index


This section will be updated with links as the month progresses, but an outline of topics is:

Week 1

[UPDATE: I’ve been terribly sick the last week so this series is delayed a bit, sorry!]

Sorry, comments are closed for this article.