ProBLOG™

Upgrading to Rails 2.2.2 in Instant Rails with Rmagick

This article assumes assuming that you're using the Rmagick gem. If not, just skip the Rmagick instructions. It also assumes that you're comfortable getting around in a Windows command prompt and installing and uninstalling standard Windows programs.

Upgrading Ruby on Rails is fairly easy, though there are a few steps involved.

First you'll need to download the latest Rmagick gem with ImageMagick. At the time of this writing, it is 2.7.1 for Ruby 1.8.6.

Unzip it to somewhere easy to get to at a command prompt then type the following commands:

gem uninstall rmagick
gem uninstall sqllite3-ruby
gem update --system
gem update
gem cleanup

Uninstall any existing version of ImageMagick that you have and then install the version of ImageMagick that came in your Rmagick gem zip.

Navigate to where you unzipped the Rmagick gem in the command prompt and type:
gem install --local rmagick

Next, make sure you have all the gems required by your application such as will_paginate by navigating to your application root, and running:
rake gems:install

Of course, the gems need to be defined in the config/environment.rb file. In my case, I have mislav-will_paginate defined like this:

Rails::Initializer.run do |config|
  #Get the Will_Paginate Plugin
  config.gem 'mislav-will_paginate',
    :version => '~> 2.3.6',
    :lib => 'will_paginate',
    :source => 'http://gems.github.com'
    #...
end

That should be it. I usually run 'rake log:clear' just to clear out those text files since they get pretty fat. For tips like these and other useful technical tips, visit Ask Some Geeks.

 

Tags: ImageMagick, Rails, RMagick, Ruby, Ruby on Rails, upgrade