This project is archived and is in readonly mode.
Bad reference to TZInfo in Rails 3.0.0 beta master
Reported by VirtualFunction | March 25th, 2010 @ 08:34 AM | in 3.0.2
I get this error:
ActionView::Template::Error (uninitialized constant ActiveSupport::TimeZone::TZInfo)
which happens in
~/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/values/time_zone.rb:309:in
tzinfo'
Looking in the source
# TODO: Preload instead of lazy load for thread safety
def tzinfo
require 'tzinfo' unless defined?(TZInfo)
@tzinfo ||= TZInfo::Timezone.get(MAPPING[name])
end
as a quick fix can be changed to:
# TODO: Preload instead of lazy load for thread safety
def tzinfo
require 'tzinfo' unless defined?(::TZInfo)
@tzinfo ||= ::TZInfo::Timezone.get(MAPPING[name])
end
I guess though in the long term addressing the todo automatically fix this.
Comments and changes to this ticket
-
José Valim March 26th, 2010 @ 12:07 AM
- Milestone cleared.
- State changed from new to open
- Assigned user set to José Valim
Could you please provide a patch? So you get the proper credits in the commit message?
-
José Valim March 26th, 2010 @ 12:24 PM
- State changed from open to resolved
Since we are preparing for a release, so I pushed your change. Thanks!
-
Repository March 26th, 2010 @ 02:52 PM
(from [5231e4e8c51333acd62d2e07a0f73cf0e0169fc2]) Ensure to reference the proper TZInfo namespace [#4268 state:resolved]. http://github.com/rails/rails/commit/5231e4e8c51333acd62d2e07a0f73c...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 4268 Bad reference to TZInfo in Rails 3.0.0 beta master (from [5231e4e8c51333acd62d2e07a0f73cf0e0169fc2]) Ensure ...