rails/rails — Issue #4909: ActiveSupport has undeclared dependency on tzinfo
Author: awendt
Created: 2012-02-06 16:16:57+00:00
State: open

I upgraded an app from Rails 3.0.x to 3.2.1 and got:

You don't have tzinfo installed in your application. Please add it to your Gemfile and run bundle install
/Users/andrewen/.gem/ruby/1.8/gems/activesupport-3.2.1/lib/active_support/core_ext/time/zones.rb:60:in `find_zone!': uninitialized constant TZInfo (NameError)

Turns out the app does not bundle the `activerecord` gem.

This problem does not appear in a fresh app generated with `--skip-active-record` because AR is bundled but not required in `application.rb` — AR depends on `tzinfo` which fixes the undeclared dependency by accident.