What You Should Know Before You Upgrade Your Rails 3 App To Rails 3.1 Beta

This is based on both research and experience.

I upgraded a Rails 3 app to Rails 3.1.

There were many issues. But they aren’t much compared to the benefits you’d get from using the latest version. Rails 3.1 takes away a lot of pain. Instead of using asset packager, having sprockets makes it so much easier to deploy an optimized application. Not all frameworks have this. In fact it hasn’t been a practice of certain developers to make sure that a single file is loaded for javascript in production and a single is loaded for stylesheet in production. Reversible migrations is another cool thing. Also read that there is no need to add “:multipart=>true” on a form if you use the file field.

You might want to read the changelog (which is not complete) to find out what else has changed.

RJS Issues

You might encounter a missing template error. Those remote links may not work anymore. What worked for me: I moved javascript code to update.js.haml.

SCSS Issues

I encountered issues with mixins and SCSS. This is probably a known issue which they are fixing.

Will paginate

Encountered errors due to a class renamed. I recommend using this for now:

gem 'will_paginate', git: '[email protected]:bridgeutopia/will_paginate.git', branch: 'rails3'

Cucumber

If you use cucumber, it currently doesn’t work for me. But Rspec works perfectly. This is a big issue for some. I do not want to bother fixing it right now. Testing manually doesn’t hurt.

Deprecation warnings

Please look at this interesting post on stackoverflow. If you’re like me (easily annoyed), check that out.