Rails Connecting to database specified by database.yml

耗尽温柔 提交于 2019-12-12 22:26:30

问题


I recently restarted POW. On reloading the Rails app I'm working on, it hung.

Checking Rails' logs I get the following repeating every 5-20 seconds:

Connecting to database specified by database.yml

I can interact with the Postgres db without issue through the Rails console, so there is no problem there. I haven't changed anything in my database.yml for weeks, so I don't think the problem is there.

What might be the problem and how can I debug it?


回答1:


Turns out it was caused by POW

I had set '$powder always_restart` which was causing some sort of loop.

I reset this using `$ powder no_restarts'




回答2:


Change your production database temporary to your development settings.

Then run in your terminal: rails console production

Most of the times it is not about your database, but probably a syntax error. Anyways you can debug it like this.



来源:https://stackoverflow.com/questions/16498451/rails-connecting-to-database-specified-by-database-yml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!