Your database.yml is overwritten when you push to heroku. http://docs.heroku.com/database#using-the-databaseurl-environment-variable-rails
<http://docs.heroku.com/database#using-the-databaseurl-environment-variable-rails>If you want to use both the heroku provided DB and a 2nd DB (RDS for example), you can reestablish a connection for the models on the other DB. I put http://gist.github.com/568769 into lib, and then incldue it from any models that I want accessing the 2nd DB. Oren On Fri, Sep 3, 2010 at 9:26 AM, Tim W <tiwat...@gmail.com> wrote: > Trying to get our app up and running on Heroku and am having some > issues with the models that connect to a 2nd remote database. > I get the error: > > :in `establish_connection': wawd database is not configured > (ActiveRecord::AdapterNotSpecified) > > The database is configured in database.yml and currently works outside > of heroku in a production setting > > xxx: > adapter: mysql > database: xxxx > username: xxxx > password: xxxx > host: xxxxx > > And the models include: > > establish_connection :xxx > > Is this not a valid way of connecting to a database on Heroku? Should > it be configured differently? > > Thanks... > > -timw > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to her...@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com<heroku%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.