Ruby 1.9.1 Released – First Production Release of the Fastest Ruby Ever!
2012 update: Still not up to speed with Ruby 1.9? Check out the Ruby 1.9 Walkthrough for a 3 hour guide to the details :-)
Years of hard work reached a crescendo today as Yuki Sonoda announced the release of Ruby 1.9.1, the first stable release of the Ruby 1.9 series of MRI. In effect, 1.9.1 replaces 1.8.7 as the latest stable release of "Matz's" Ruby interpreter although (as we'll cover below) it's not entirely that simple.
We'll be doing a roundup of Ruby 1.9 related links and resources soon here on Ruby Inside, but if you want to get up to speed with what Ruby 1.9 is all about right now, I'd recommend checking out the Migrating to Ruby 1.9 presentation by Bruce Williams, Ruby 1.9: What to Expect by Sam Ruby, and James Edward Gray's Getting Code Ready for Ruby 1.9. Mauricio Fernandez's Changes in Ruby 1.9 is a more exhaustive list and is still pretty good although it was last updated over a year ago.
Download
The official download information is as follows (ruby-lang.org MAY still be down, so scroll down further for a link to our mirror!):
ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
SIZE: 7190271 bytes
MD5: 0278610ec3f895ece688de703d99143e
SHA256: de7d33aeabdba123404c21230142299ac1de88c944c9f3215b816e824dd33321ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
SIZE: 9025004 bytes
MD5: 50e4f381ce68c6de72bace6d75f0135b
SHA256: a5485951823c8c22ddf6100fc9e10c7bfc85fb5a4483844033cee0fad9e292ccftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.zip
SIZE: 10273609 bytes
MD5: 3377d43b041877cda108e243c6b7f436
SHA256: 00562fce4108e5c6024c4152f943eaa7dcc8cf97d5c449ac102673a0d5c1943b
If ruby-lang.org is still down or is as slow as ever, you can alternatively download our mirror of ruby-1.9.1-p0.tar.bz2 (http://www.rubyinside.com/files/ruby-1.9.1-p0.tar.bz2) - be aware that this is a bzip2 file and it may be taken down within the next few weeks (in which case, just use the ruby-lang links). Thanks to syd_ - Scott Wisely - for providing us with the file.
It's fast, but you shouldn't be..
Just a month ago, Antonio Cangiano ran some benchmarks against a Ruby 1.9.1 preview versus several other Ruby interpreters. Ruby 1.9.1 clocked in at at least twice as fast as Ruby 1.8.7. This is great progress and will tone down some of the "but Ruby is slow" type arguments that have gone around, even though in the grand scheme of things it barely makes a dent.
While Ruby 1.9.1's speed is alluring to existing 1.8 users, however, unless you're dead sure of what you're doing, definitely do not expect to be using Ruby 1.9.1 as your production version of Ruby right away! A lot of libraries and gems will not work with it and code that runs may not necessarily be operating properly (this is where tests come in very handy!) In short, go get Ruby 1.9.1 (unless on Windows - in which case you should wait for a new One Click Installer), check it out, test your code against it (Dr Nic has written a great guide about this), see which gems don't work, and generally use it as a "stick in the sand" to measure a future migration against.
You'll see a lot of blog posts coming along in the next few weeks and months regarding efforts to bring existing libraries up to 1.9.1 standards. Help out where you can, file bug reports, and keep an eye out on the general consensus. We'll be looking at this closely too and keeping you up to date with progress here on Ruby Inside.
JRuby To Adopt 1.9.1 Standards in JRuby 1.2
Ever proactive, Charles Nutter of the JRuby team was quick to tentatively promise Ruby 1.9.1 support in JRuby 1.2, to come in late February:
Now that the stable release is out, we will pull 1.9.1 stdlib into JRuby. We'll ship our 1.9.1-compatible (mostly? hopefully?) release of JRuby 1.2 in late February.
Thankfully, 1.8 support will not be evaporating any time soon, however:
JRuby will remain at 1.8.6 compatibility (in 1.8 mode) until such time that users let us know that they want support for 1.8.7+ features.
January 31, 2009 at 4:35 am
I wrote a guide on getting Ruby 1.9.1 working with Rails edge (2.3) and Rubygems 1.3.1: http://frozenplague.net/2009/01/ruby-191-rubygems-rails/. The mysql and postgres gems do not install (extconf runs fine, make fails horribly) but other than that everything seems peachy.
January 31, 2009 at 4:42 am
Awesome, Radar! :)
For me, quite a few gems do not install. hpricot, thin, mongrel are the three biggies for me so far. I am sure there are ways to get them to install, but until it's as easy as gem install/gem1.9 install or similar, people need to keep complaing :)
Some things install just great though - just installed aws-s3 with builder, and xml-simple; it was a breeze.
January 31, 2009 at 6:47 am
Let us rock!
January 31, 2009 at 9:22 am
Does anyone know how to install libxml-ruby gem on 1.9.1 / Ubuntu?
Getting weird errors while building native extensions. libxml2-dev installed.
January 31, 2009 at 1:46 pm
# Here's how to install Ruby1.9 alongside 1.8. The build scripts of Ruby1.9 will use the suffix to change the name of the program and the name of the directory for Ruby libraries.
./configure —prefix=/usr/local —program-suffix=1.9
make
sudo make install
# http://www.codefluency.com/articles/2007/12/02/it-s-time-to-play-with-1-9/
January 31, 2009 at 5:14 pm
A note to OS X users out there: MacPorts has made Ruby 1.9.1 available. Simply...
> sudo port sync
> sudo port install ruby19
January 31, 2009 at 6:57 pm
Awesome update, thanks James!
January 31, 2009 at 10:09 pm
I updated the MySQL/Ruby 2.8 source to fix the build under 1.9 and released it as a gem. You can use it until the main rubyforge gem gets fixed.
To install:
sudo gem install jonbrenner-mysql
January 31, 2009 at 10:40 pm
Oh, and make sure you have gems.github.com in your sources:
gem sources -a http://gems.github.com
February 1, 2009 at 12:26 am
For the hpricot gem install, it appears it's using RARRAY(arguments)->ptr and ->len where it should be using RARRAYPTR and RARRAYLEN (at least, according to a comment that was posted to my blog). My C-Foo isn't strong enough to edit the fast_xs.c, so I think I'll be leaving that to the experts.
February 1, 2009 at 10:35 am
C-fu improved over the course of the afternoon (with some help from the guys in #ruby-lang), and I got the hpricot gem installed as well as the mysql and pg gem. Working now on the thin gem.
February 1, 2009 at 11:01 am
thin works too now. Guide is on my blog.
Pingback: buzzup.com
February 1, 2009 at 7:36 pm
MacPorts users: I submitted a patch to the Portfile to add a variant to Ruby19 that removes the "1.9" suffix. It's pending approval, but you can use this patch now if you have a local ports repository: http://trac.macports.org/ticket/18314
February 2, 2009 at 3:01 pm
Still chock full of warnings. No attention to detail. Same old sloppy shit, different day.
February 2, 2009 at 3:31 pm
The nosuffix patch was approved. If you want to use 1.9.1 exclusively (without 1.8 on the system also), you can install it like so:
sudo port install ruby19 +nosuffix
February 2, 2009 at 4:29 pm
"Still chock full of warnings. No attention to detail. Same old sloppy shit, different day"
I'm not sure what your build environment looks like, but I've compiled under cygwin and leopard with surprisingly FEW warnings for any revision, let alone a p0 release.
February 2, 2009 at 7:17 pm
I cant get mongrel to work, but thin, postgres, and mysql work.
The Rails framework tests act really weird, and also Ruby1.9 pulled out test/unit, so you may need to install it as a gem
February 3, 2009 at 8:57 am
@Sam:
What problems did you have with mongrel? It worked fine for me with a few small modifications to fastthread
February 11, 2009 at 7:02 pm
@radar
I followed the example at
http://blog.phusion.nl/2009/02/02/getting-ready-for-ruby-191/
and applied the patches there and I manged to get fastthread to work.
February 11, 2009 at 7:18 pm
managed... darn typos