I had an issue today upgrading to Ruby 2.0.0 using CarrierWave/RMagick and rails s
wouldn’t run. The steps are listed below to get it working again.
Upgrade Rails
In most cases, just change the Gemfile specification to:
1 2 |
|
Then run:
1 2 3 |
|
The Rails gem will be updated by bundler and the Gemfile.lock file will be updated to record the new gem version. You’ll see a message showing which version of Rails is running when you start the webserver.
Upgrade Ruby
On Mac OS X, the easiest way to get latest Ruby is via Homebrew:
1 2 3 |
|
Upgrade Rake, Bundler, Rubygems-Bundler
Most developers often install the latest version of Rails/Ruby but neglect other components. These are important to keep regularly updated.
1 2 3 4 5 |
|
Upgrade RMagick
If you’re using CarrierWave, sometimes upgrading latest Ruby/Rails will create issues when running the rails server. Easiest fix is to reinstall rmagick with your current imagemagick.
1
|
|
Bundle Update
Good to always ensure nothing was missed.
1
|
|
Here’s a good blog post to Upgrade from Rails 3.2 to Rails 4.0 by Mario Chavez.
Here’s also an Ebook Upgrading to Rails 4 by Andy Lindeman.