No has entrat com a usuari. Pots registrar-te o entrar. Així podràs crear entrades o comentar-ne d'altres!
Gravatar
0

As you may know, Rails 3.2.1 has been released with important improvements of performace. Specially in development environment thanks to Journey engine.

I have recently faced the task to upgrade some projects to Rails 3.2.1 and I would like to show how I did it. It is easy to proceed. The main thing I did was change Gemfile as follows:

gem 'rails', '3.2.1'

group :assets do
    gem 'sass-rails', " ~> 3.2.3"
    gem 'coffee-rails', "~> 3.2.1" 
    gem 'uglifier', '>= 1.0.3' 
end

Once changed Gemfile, I just ran a

bundle update

to update properly the gem versions.

It is also recommended to add couple of new configurations in /config/environtments/development.rb:

# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict


# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5

And also it is required to add mass_assignment_sanitizer to /config/environtments/test.rb

# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict

You may notice that Rails 3.2.X requires at least Ruby 1.8.7. Support for all of the previous Ruby versions has been dropped officially and you should upgrade as early as possible. Rails 3.2 is also compatible with Ruby 1.9.2.

Upgrade was done with just few changes and the benefit is quite huge in terms of development.


Tags


0 comentaris