Read more

Upgrading a Rails 3.2 application to Ruby 2.1 is really easy

Henning Koch
November 19, 2014Software engineer at makandra GmbH

Upgrading from Ruby 1.8.7 to 2.1.2 took me an hour for a medium-sized application. It involved hardly any changes except

  • removing the occasional monkey patch where I had backported functionality from modern Rubies
  • Migrating from require to require_relative where I loaded RSpec factories in Cucumber's env.rb (the Rails application root is no longer in the load path by default)
  • replacing the old debugger with byebug
  • removing sytem_timer from Gemfile (see this SO thread Show archive.org snapshot for details)
  • If you get LoadError: cannot load such file -- iconv: Add gem 'iconv' to your Gemfile. iconv is a part of Ruby that was removed in 2.0. Rails 3 seems to depend on it.
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

All the pain with magic # encoding: utf-8 comments is gone since UTF-8 is a default encoding in Ruby 2+.

Posted by Henning Koch to makandra dev (2014-11-19 08:44)