Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Rails 4 Released: Faster Pages With Turbolinks

Rails 4 Released: Faster Pages With Turbolinks

Leia em Português

This item in japanese

Lire ce contenu en français


The Ruby on Rails team has just released Rails 4.0. One and a half years in the making, Rails 4 comes with some interesting new features like Turbolinks, improved caching and is thread-safe by default. Many of the changes are already used by 37 Signals' Basecamp Next.

Turbolinks transforms your Rails application into a single page JavaScript application, that is, it does not load new pages but instead replaces the current page with new content from the server: 

This is similar to pjax, but instead of worrying about what element on the page to replace, and tailoring the server-side response to fit, we replace the entire body. This means that you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response.

Rails 4 also comes with support for key-based cache expiration, which automates cache invalidation and thus makes it easier to implement intricate caching structures.

The release also dropped support for Ruby 1.8 and recommends to upgrade to Ruby 2. Ruby 1.9 is still supported, but Rails 5 will require at least Ruby 2. As usual, there's a detailled upgrade guide for Rails 3.2 applications to Rails 4.

Popular Rails books have also received an update: Agile Web Development with Rails 4 by Sam Ruby and The Rails 4 Way by former InfoQ editor Obie Fernandez.

For a more detailed list of changes, see the changelog. Have you already upgraded your application to Rails 4? We'd love to hear about your experience!

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • rails

    by Tom Tom,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    somehow rails almost always addresses the most popular issues I have in developing web apps... fantastic work!!

  • Re: rails

    by Jamal Soueidan,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Of course RubyonRails is a great framework for most web apps! and the community around it is even better :D

  • Re: rails

    by Mirko Stocker,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    So, have you upgraded your applications already?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p