4

I've been away from programming for a few months but I'm back now and surprised to rails already at version 3.2.8. I feel slightly rusty and forgot how to successfully upgrade my ruby on rails version to the latest.

I'm currently using version 3.2.3

Is there a standard way of upgrading? I remember the last time I upgraded I had to modify some lines in the gemfile. A google search didn't help so I would appreciate a solution from my favourite place thanks.

Kind regards

LondonGuy
  • 10,778
  • 11
  • 79
  • 151

2 Answers2

4

If you just want to install the latest rails gem

gem install rails -v 3.2.8

If it's a rails 3.2.3 app

  1. Edit Gemfile, changing the line gem 'rails', '3.2.3' to gem 'rails', '3.2.8'
  2. Run bundle update rails

(from this so question)

Community
  • 1
  • 1
Dty
  • 12,253
  • 6
  • 43
  • 61
  • Also just found this question. Worked perfectly. Thanks – LondonGuy Aug 20 '12 at 09:52
  • When updating the rails application, be sure to check http://weblog.rubyonrails.org/releases/ to fix any possible errors or check for plugins, etc. that are deprecated. – Nick Ruta Nov 03 '12 at 19:01
3

For each app you want to upgrade:

Gemfile

gem 'rails', '3.2.8'
# ...

Then on the command line:

$ bundle update rails
Paul Fioravanti
  • 16,423
  • 7
  • 71
  • 122