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
requiretorequire_relativewhere I loaded RSpec factories in Cucumber'senv.rb(the Rails application root is no longer in the load path by default) - replacing the old debugger with
byebug - removing
sytem_timerfrom Gemfile (see this SO thread Show archive.org snapshot for details) - If you get
LoadError: cannot load such file -- iconv: Addgem 'iconv'to your Gemfile.iconvis a part of Ruby that was removed in 2.0. Rails 3 seems to depend on it.
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 07:44)