Rails 4 Released: Faster Pages With Turbolinks

| by Mirko Stocker Follow 0 Followers on Jun 28, 2013. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

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

Adoption Stage

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.

Tell us what you think

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

Email me replies to any of my messages in this thread

rails by Tom Tom

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

Re: rails by Jamal Soueidan

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

So, have you upgraded your applications already?

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you