First, what is the difference between configuring in my application.rb file vs. my environment.rb file?
I read that I need to configure my timezone default in my environment.rb file. I am not quite sure how to do that though. So far I have this in my environment.rb file:
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
SampleApp::Application.initialize!
Do I need to rerun the rails server after make changes? Any additional steps?
Thanks!
In rails 2, it was environment.rb that had all the configuration. In rails 3 it’s changed to application.rb, as well as environment/production.rb and environment/development.rb, and Gemfile. To configure timezone, put this in application.rb in the Application class:
You can run
rake time:zones:allto see a list of available timezones.edit In rails 3 you don’t need to touch environment.rb.