InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Rails 1.2 Release Candidate Announced

Posted by Obie Fernandez on Nov 24, 2006

Sections
Architecture & Design,
Development,
Enterprise Architecture
Topics
REST ,
Ruby on Rails ,
Ruby
Tags
Rails ,
Releases ,
Announcements

This week, David Heinemeir Hansson announced availability of the Rails 1.2 Release Candidate 1:

It's been almost eight months since the last major release of Rails introduced RJS, respond_to, eager loading, and much more. It's about time we introduced the latest batch of big ideas we've been polishing in the interim.

Since this is a major new release and we've gotten so much incredible uptake even since 1.1, we're feeling the need to certify that things work as well as they can out the gates. Thus, this release candidate to fret out any regressions or major issues with the new features.

Rails 1.2 formally introduces RESTful features that have been on Rails developer's minds since David's keynote at RailsConf 2006. The new scaffold_resource generator helps developers structure their applications REST-style along with the new map.resources directive in routes.rb.

The respond_to handler method for controllers now understands URL suffixes, letting developers write super-concise code for generating the same content as differing types of responses, such as HTML, XML, and RSS.

One of the biggest subjects of criticism about Rails is support (or lack there-of) for Unicode. That's why the official inclusion of ActiveSupport::Multibyte in Rails 1.2 is such big news. In David's words:

While Rails has always been able to store and display unicode with no beef, it’s been a little more complicated to truncate, reverse, or get the exact length of a UTF-8 string. You needed to fool around with KCODE yourself and while plenty of people made it work, it wasn’t as plug’n’play easy as you could have hoped (or perhaps even expected). [...]

With Rails 1.2, we’re assuming that you want to play well with unicode out the gates. The default charset for action renderings is therefore also UTF-8 (you can set another with ActionController::Base.default_charset=(encoding)). KCODE is automatically set to UTF-8 as well.

A screencast demonstrating Rails multibyte support is available.

Many notable deprecations are now in place and will produce warnings in test output and logs. Here is a short list of deprecation-related changes:

  • The use of start_form_tag and end_form_tag is now deprecated in favor of <% form_tag ... do %>...<% end %>
  • Passing :post => true as a link modifier is deprecated in favor of :method => :post.
  • link_to_image and link_image_to are deprecated in favor of link_to(image_tag(...), url)

Well-known Railser Josh Susser is first out of the gate with commentary about the new release, reminding the community of why release candidates are produced:

The point of a release candidate is to let the code bake for a bit while not making any changes, giving the development team a chance to find any lingering bugs. The developers are saying, "we think we're done, but lets make sure there aren't any showstoppers that we haven't found yet." In one sense it's an admission that test coverage is incomplete, but the world isn't perfect and neither is anyone's test suite.

Feeling adventurous? To install the new release as a gem, simply type the following at your command prompt:

gem install rails --source http://gems.rubyonrails.org --include-dependencies

Alternatively, you can "freeze" the release candidate code for a particular project, by running the following rake task in your project directory:

rake rails:freeze:edge TAG=rel_1-2-0_RC1

In a comment to the Rails blog announcement, David says the final release of Rails 1.2 will happen in a few weeks.

More New Feature Explanations by Obie Fernandez Posted
  1. Back to top

    More New Feature Explanations

    by Obie Fernandez

    The Rails blog has three really good posts explaining changes in ActiveSupport, ActionPack, and ActiveRecord

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.