Shopify's path to Rails 3
blog.shopify.com
blog.shopify.com
By the way, a patch of mine is in rails 3.0.3 that just came out and now you can just do a global replace of <%= with <%== and be mostly done with it. But that would be cheating.
The tidy lib is installed by default on the Mac. It's very fast (written in C) so it only adds a few seconds to my tests. (I'm leaving it in after the conversion.)
Another tip: it helps to put a lot of <&bad"> tags in your fixtures, that will trigger a bunch of errors in the above test if you are not doing your escaping properly.
I think it's best to think of Rails 3 as a separate project that happens to share some code with Rails 2.
I hope it's worth it in the end...
Rather than use the upgrade gem I started a new project, copied/converted what I could, and then let my tests tell me what was missing. First the models, then controllers, and finally the integration tests.
Without automated testing you're fucked of course, but as long as you have a decent safety net in place you'll get there.
I'd actually say upgrading to Ruby 1.9.2 gave me more headaches than upgrading Rails.
Encoding.default_internal = Encoding.default_external = "UTF-8"
but as JEG states in http://blog.grayproductions.net/articles/ruby_19s_three_defa..., this throws warnings and may still not fix things.Encoding issues rank up there with Array.to_s pains when moving to 1.9
Hmm! With a staff of 11 FTE developers ... you would think they would put more weight on this aspect of the transition. But yeah, other priorities take over.