Archive for July, 2008
Monthly Archive
Wednesday, July 16th, 2008
Developing in Rails 2.1 and deploying in Rails 2.0.2 (or error – undefined method time_zone)
Problem
You are developing on the latest version of Rails (2.1), but your production server for deployment uses version 2.0.2 (as dreamhost is using at the moment).
Solution
First change the environment.rb file to use the rails version in your deployment server
RAILS_GEM_VERSION = ‘2.0.2′ unless defined? RAILS_GEM_VERSION
You should probably be geting the error: undefined method = time [...]