Notes on upgrading Rails 3.1 to 3.2

Just for fun, I’m bringing one of my older Rails projects up to date with respect to Ruby and Rails. It’s currently running on 3.1, and as I recall, getting from 3.1 to 3.2 is harder than getting from 3.2 to 4.0.

Let’s see how it goes.

RSpec

Ok this isn’t Rails proper, but it’s still annoying so it needs to be fixed.

DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from block (2 levels) in <top (required)> at /Users/doolin/src/contact/spec/views/email_contacts/thankyou.html.erb_spec.rb:19)
  • Templates: Patterns like describe 'email_contacts/index.html.erb' do need to lose the html.erb at the end. The wisdom of testing views is a different discussion for a later day.

ActiveSupport::Concern

This is an odd error, and apparently due to the RSpec version. Not going to fix at this time.

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in #<Class:0x007f9d29190230> instead.  (called from <top (required)> at /Users/doolin/src/contact/spec/views/email_contacts/thankyou.html.erb_spec.rb:3)

Well, dang, the last time I did this I recall it being a lot more involved. Painful even. To be fair, this isn’t a very complicated application, and I do recall some heavy lifting getting from Rails 3.0 to Rails 3.1. In any case, pulling the trigger on this article for Rails 3.2.22.

The next step, of course, will be upgrading to current Rails and current RSpec.