#rails

Upgrading to Rails 3.2 from 3.1

Yesterday I upgraded one of my old-pending-hobby projects to latest Rails version, which is 3.2.8 now. Since I have several other projects in old version, I’d like to keep a note for what I’ve done.

As you can see in my commit, all you have to do is update the version in Gemfile and hit bundle update in your terminal.

```ruby Gemfile gem ‘rails’, ‘3.2.0’

group :assets do gem ‘sass-rails’, “ ~> 3.2.3” gem ‘coffee-rails’, “~> 3.2.1” gem ‘uglifier’, ‘>= 1.0.3’ end


Then add new configuration to `development.rb` and `test.rb` environment file. That's all :)

```ruby config/environments/development.rb
  # 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

  # Do not compress assets
  config.assets.compress = false

```diff config/environments/test.rb

Qihuan Piao

Qihuan Piao

Originally from China and now living in Tokyo, I started this blog to practice English. Over the years, writing helped me find my own voice and explore thoughts about identity, life, and ordinary things that catch my curiosity. I mostly write for myself, but I love it when something here connects with someone else.

Meanwhile, what I wrote in Japanese

Fruit Ninjia in Real Life and Flying Kittens

December 28, 2012

Meanwhile, what I wrote in Chinese

小悲伤之便当盒篇

December 18, 2012