In association with heise online

23 January 2012, 10:08

Rails 3.2 arrives

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Ruby On Rails logo The Ruby on Rails developers have now released Rails 3.2, the opinionated Ruby framework for web development. Originally intended for a December release, 3.2 will be the last Rails release that supports Ruby 1.8.7; Rails 4.0, the next major release of Rails, will require Ruby 1.9.3 or above.

According to Rails creator David Heinemeier Hansson, the most noticeable new feature of 3.2 is a "ton and a half faster" development mode which now only reloads classes which have changed; this makes a dramatic difference with larger applications. The processing of routes when handling web browser requests is also faster thanks to the integration of new routing engine Journey, and the generation of links in pages has also been sped up.

Debugging and performance tuning are aided by two new features: an easy way to explain database queries and a tagged logger. Adding .explain to a database query will now return the details of the query as presented to the database, including information on which indexes it uses. In development mode, and by default, if a query takes more than half a second, the query is automatically explained inline. The tagged logger makes it simple to mark the source of entries in a log and supports the nesting of multiple tags.

Simple key/value stores have proven to be very useful to developers and a new Active Record Store brings that feature to Rails, without having to switch away from a relational database. Now, developers can define a key/value store as a field in an Active Record class and store multiple key/value pairs in the store for that record. Defining accessors can also make particular keys more concise to refer to.

Other changes, detailed in the release notes, include the ability to store rails defaults in ~/.railsrc, new options in date helpers for ISO 8601 style dates, the casting of "on" and "ON" in boolean columns to true, and more control over the scope of database migrations. The release notes also cover how to upgrade to Rails 3.2 and what functions have been deprecated in this release.

A complete list of changes based on commits or a "Changelog compilation" are also available. Existing developers can upgrade their Rails Ruby gems, while new developers can go to the Rails installation page on the project's site for details on how to install the MIT licensed framework.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit