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!
Community comments
rails
by Tom Tom,
Re: rails
by Jamal Soueidan,
Re: rails
by Mirko Stocker,
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?