Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Bad reference to TZInfo in Rails 3.0.0 beta master

#4268

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.

Reported by VirtualFunction · March 25th, 2010 @ 08:34 AM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: none

Activity

  1. José Valim
    José Valim
    • 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?

    March 26th, 2010 @ 12:07 AM

  2. José Valim
    José Valim
    • State changed from open to resolved

    Since we are preparing for a release, so I pushed your change. Thanks!

    March 26th, 2010 @ 12:24 PM

  3. Repository
  4. Jeremy Kemper