assaf/vanity — Issue #81: Inappropriately accesses the database during initialization
Author: stouset
Created: 2011-11-06 20:04:27+00:00
State: open

In Rails 3, when running `rake assets:precompile`, Vanity tries to access the production Redis database. It also tries to access the SQL database if `model` is specified in a a metric. Unfortunately, in an app that runs on Heroku, the production database is never specified and/or accessible from the local console.

I'm not sure exactly why it would be accessing the databases when even ActiveRecord doesn't, but it needs to somehow access the information lazily rather than actively.