eigenclass logo
MAIN  Index  Search  Changes  PageRank  Login

Towards compatibility with Ruby 1.9: Rails, Rake, RubyGems...

Ruby 1.9 is expected to be released at the end of this year and although it's a moving target, moriq (Kazuhiro Yoshida) is trying to make Rails run on it. Even if you don't care about Rails on 1.9, there's a moral to this story. If you have any sizeable amount of code which might have to run on 1.9, your best allies are:

  • defensive programming: get rid of all those warnings now, use "future-proof" variants (like module_eval{ define_method(...){ } } instead of klass.send(:define_method, ...){ ... })*1
  • unit tests!

In addition to Rails' base libraries (ActiveRecord, ActionPack, ActiveSupport), moriq has been working on other libs/apps needed for Rails development:

  • rake
  • rubygems
  • sqlite-ruby3/sqlite-ruby

You can find his Rails branch (based on 1.2) at http://dev.moriq.com/svn/local/rails/trunk/ .

moriq has been blogging about his feat from day one (in Japanese), and he's logging the progress of the unit tests as he proceeds. ActionPack is but 1 failure away from green, ActiveRecord 7 and ActiveSupport 6 failures + 6 errors (but several are related to his non-UTC timezone). Rake looks much worse, since it segfaults.

Having read large parts of Rails' core, I'm glad I'm not in the position of having to make sure those >80000 lines of code still work. It seems it'll be a long while after 1.9 before Rails supports it officially.



yarv cheers - Jeremy Kemper (2007-03-06 (Tue) 11:29:08)

Great work, moriq!

Rails ran fine on pre-YARV 1.9 and moriq's update is mostly one-liners, so take heart, Mauricio..


Nice site - Valintino (2007-04-16 (Mon) 18:37:53)

Hello, Your site is great. Regards, Valintino Guxxi

Rudolf_Mine 2007-05-05 (Sat) 11:57:53

Great site. So many useful info.

Really perfect!!! I'll bookmark! 

Last modified:2007/03/06 04:36:49
Keyword(s):[blog] [ruby] [frontpage] [1.9] [rails] [rake] [rubygems] [moriq] [subpar]
References:[Rails on 1.9: first benchmarks, YARV exposed to non-synthetic tests]

*1 Sure, knowing what's changing helps there, and that's what my changelog is for.