First Rails 3 Beta Released
Less than a year since the last Ruby on Rails release and over 4000 commits later, the beta of Rails 3.0 has been released.
The increase in the version number from 2.3 to 3.0 is well-deserved, considering that Rails 3 is not just a bunch of enhancements but actually a merge of Rails 2.3 with its former rival Merb, to combine the best of both worlds:
There are all the good ideas brought over from when the Merb team joined the party and brought a focus on framework agnosticism, slimmer and faster internals, and a handful of tasty APIs.
Besides the many internal cleanups, there are of course also new features. From the release notes:
- Brand new router with an emphasis on RESTful declarations (more from Yehuda Katz)
- New Action Mailer API modeled after Action Controller (more from Mikel Lindsaar)
- New Active Record chainable query language built on top of relational algebra (more on the new API)
- Explicit dependency management with Bundler
Another area that got much attention is security, as Yehuda Katz explains in an interview with SD Times:
We went through the known remaining security vulnerabilities based on having spoken to Twitter and having them say 'your security tools are too manual right now.' [To prevent cross-site-scripting vulnerabilities ..] we went through all of Rails' internals and marked the form tags as safe, which means that for the vast majority of cases, users won't have to do a lot. [..] it's now almost impossible to have an accidental XSS attack.
To read more on Rails 3.0, the detailed release notes cover the changes in great detail. Yehuda also wrote a retrospective over the last year, giving a high-level summary (compared to the release notes) of the changes. Jeremy McAnally started a series in his blog "about moving your skills and migrating your code to Rails 3". The first part starts with a high-level view on the changes Rails has undergone; the second part is called "approaching the upgrade". RubyInside has a collection of 36 links on Rails 3.0.
Rails 3.0 works both with Ruby 1.8.7, 1.9.2, as well as JRuby. Rails 3 on IronRuby doesn't work yet because the current IronRuby trunk (which will soon be released as 1.0) is focused on 1.8.6 support - Rails needs some 1.8.7 features. After IronRuby 1.0, the project will switch to 1.9 support which should then support Rails 3. At the moment there's a discussion on the IronRuby-core mailing list whether to add 1.8.7 support to IronRuby 1.0 to get Rails 3 to work.
To find out whether you could try to upgrade your applications to 3.0, the new RailsPlugins.org maintains a directory of plugins and their 3.0 compatibility.
A date for the final release has not yet been announced. What do you think about Rails 3? Have you already tried to upgrade your applications?
Ralph Winzinger Nov 25, 2014