How to use multiple databases for one rails 3.1 app in Heroku?

前端 未结 3 861
忘掉有多难
忘掉有多难 2020-12-15 08:53

My Rails 3.1 application connects to 2 databases, one is the default, the other is an Amazon RDS MYSQL instance.

The current database.yml contains two production dat

3条回答
  •  被撕碎了的回忆
    2020-12-15 09:14

    Heroku will always connect your app to the production DB that they create for you. If you want to make an additional connection you'll need to do this in your code manually, and create a ENV var that the code can use as a connection string.

    Anything in the production segment of database.yml is binned by Heroku and replaced.

提交回复
热议问题