InfoQ

News

Rails 2.2 Released: A Glance at New Features

Posted by Mirko Stocker on Nov 21, 2008

Community
Ruby
Topics
Web Frameworks
Tags
Rails ,
Threading

After two release candidates in the last few weeks, Rails 2.2 has finally been released. Although the version number doesn't indicate a huge step, there are a lot of new features in Rails. 

Internationalization

A long anticipated issue finally resolved—Rails now offers a framework for internationalization tasks. Mind that this doesn't mean that Rails now supports any other locale than en-US out of the box, it just makes it easier to hook other internationalization implementations into Rails. Sven Fuchs explains the goals and motivation of Rails' internationalization support in his blog: 

The first part is the API itself which is just a Ruby module with a bunch of methods that will be used by Rails and delegate all requests to a backend.
The second part is the Simple backend which implements whatever is necessary to re-localize Rails back to en-US.

If you would rather see a quick example, have a look at Trevor Turk's simple localization blog

Thread Safety

With version 2.2, Rails is finally thread-safe, thanks to Josh Peek's Google Summer of Code project. With this step also comes the necessity of connection pools. But what does thread safety actually mean for Rails? From the release notes:

Depending on your web server infrastructure, this means you can handle more requests with fewer copies of Rails in memory, leading to better server performance and higher utilization of multiple cores.

JRuby's Charles Nutter also wrote a detailed blog entry answering that question: "it means removing the single coarse-grained lock around every incoming request and replacing it with finer-grained locks around only those resources that need to be shared across threads". 

Improved Documentation

The internal documentation of Rails has been improved at many places, and there's also the Ruby on Rails guides site with many extensive and profound articles on topics such as security, testing, debugging.

Other changes include the new mailer layouts, or comfortable memoization to make your code more readable. Another new feature is the simpler conditional get support, which we already covered in a recent Rails roundup on ETags. Some last minute changes were done in RC2, namely the improvement of the request forgery protection and tuning of the ActiveRecord connection pooling code. 

Upgrading

There are a lot more changes than what we've presented here, you can find a more comprehensive list in the Rails 2.2 release notes.

Rails 2.2 depends on very recent Ruby Gems 1.3.1 installation. If you are having trouble with the update of Ruby Gems, take a look at Eric Hodel's blog for details.

Afterwards, you should be all set to install Rails:

gem install rails

Rails 2.3 beta in testing by Sachin Mehra Posted Nov 24, 2008 6:31 AM
Re: Rails 2.3 beta in testing by Mirko Stocker Posted Nov 24, 2008 2:44 PM
  1. Back to top

    Rails 2.3 beta in testing

    Nov 24, 2008 6:31 AM by Sachin Mehra

    I got to know that Rails 2.3 beta is in testing and will come out real soon. Any info on that?

  2. Back to top

    Re: Rails 2.3 beta in testing

    Nov 24, 2008 2:44 PM by Mirko Stocker

    I have an interview with DHH planned, and there will definitely be something about future versions in it.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.