Wednesday, July 20, 2011

[Rails] Time.zone is nil creating problems

Hello guys,

I am using ruby 1.9.2-p290 and rails 2.3.11 and when i am trying to
run Time.zone in my console it is showing me nil and when i am trying
to mention it in the environment.rb file by config.time_zone = 'UTC'
it is showing me an error

.rvm/gems/ruby-1.9.2-p290/gems/rails-2.3.11/lib/initializer.rb:561:in
`initialize_time_zone': Value assigned to config.time_zone not
recognized.Run "rake -D time" for a list of tasks for finding
appropriate time zone names. (RuntimeError)


I have also mentioned these two things in my environment.rb file
config.active_record.default_timezone = :utc

and

ENV['TZ'] = 'UTC'

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate