Friday, May 15, 2009

Quick Heads up: Upgrading from Rails 1.2.6 to 2.3.2

I was just upgrading one of our apps into the new age from 1.2.6 to 2.3.2 and found an interesting issue. With the corresponding upgrade of Rspec. The new rspec generates a spec_helper.rb file with this line at the top:


ENV["RAILS_ENV"] ||= 'test'


For some reason this plays funny with our environment in that all of our dev machines were running the tests in development mode. Obviously somewhat less than ideal. Just take out the 'or' from the 'or equals' and we're set.


ENV["RAILS_ENV"] = 'test'


There is probably more to this story but just in case this could help someone wanted to jot it down real quickly.

No comments:

Post a Comment