连接到DATABASE_URL heroku崩溃指定的数据库

时间:2014-10-30 15:21:07

标签: ruby-on-rails heroku heroku-postgres

我一直在heroku日志中得到这个:

14-10-30T12:59:51+00:00 heroku[slug-compiler]: Slug compilation finished
2014-10-30T12:59:51.608050+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-30T13:00:00.705131+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 35211 -c ./co
nfig/unicorn.rb`
2014-10-30T13:00:03.661476+00:00 app[web.1]: I, [2014-10-30T13:00:03.661285 #2]  INFO -- : Refreshing Gem list
2014-10-30T13:00:15.728226+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2014-10-30T13:00:21.655877+00:00 heroku[web.1]: State changed from starting to crashed

几乎检查了谷歌中的所有答案。

db:setup working

db:migrate working

配置config.assets.initialize_on_precompile = false

它不仅仅是heroku,我在本地生产环境中也遇到了同样的错误:

Macs-MacBook-Pro:v1 mac$ RAILS_ENV=production rails s
=> Booting WEBrick
=> Rails 3.2.13 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Connecting to database specified by database.yml
Exiting

这里是database.yml

production:
  adapter: postgresql
  host: 127.0.0.1
  port: 5432
  encoding: unicode
  database: s1_development
  pool: 5
  username: postgres
  password: password
对于本地开发环境没有任何问题:(

我可以做什么?或者如何找到问题?

0 个答案:

没有答案