Rails应用程序在部署到Heroku时崩溃,但日志声称一切正常

cxfofazt  于 2024-01-08  发布在  其他
关注(0)|答案(2)|浏览(205)

好吧,我在Heroku上部署了一个非常基本的应用程序。我严格按照tutorial的要求进行了部署。关于这个部署的一切都是教科书式的,但是当我打开Heroku上的网站时,我得到了一条令人沮丧的模糊消息:“很抱歉,出了问题。”
当我做“英雄ps”的时候它说:

  1. Process State Command
  2. ------- ---------- ------------------------------------
  3. web.1 up for 13m bundle exec rails server thin -p $..

字符串
当我运行“heroku logs”时,我得到了通常的弃用消息,然后是下面的文本。但是我没有在这些日志中看到任何会导致应用程序崩溃的红旗。我错过了什么吗?

  1. 2012-06-24T12:50:50+00:00 heroku[slugc]: Slug compilation started
  2. 2012-06-24T12:51:25+00:00 heroku[api]: Release v9 created by [email protected] 2012-06-24T12:51:25+00:00 heroku[api]: Deploy ff89ee6 by [email protected]
  3. 2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from up to bouncing
  4. 2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from bouncing to created
  5. 2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from created to starting
  6. 2012-06-24T12:51:25+00:00 heroku[slugc]: Slug compilation finished
  7. 2012-06-24T12:51:27+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 37816 -e production`
  8. 2012-06-24T12:51:27+00:00 heroku[web.1]: Stopping all processes with SIGTERM
  9. 2012-06-24T12:51:28+00:00 app[web.1]: Exiting
  10. 2012-06-24T12:51:29+00:00 heroku[web.1]: Process exited with status 0
  11. 2012-06-24T12:51:34+00:00 app[web.1]: => Booting Thin
  12. 2012-06-24T12:51:34+00:00 app[web.1]: => Rails 3.2.5 application starting in production on http://0.0.0.0:37816
  13. 2012-06-24T12:51:34+00:00 app[web.1]: => Ctrl-C to shutdown server
  14. 2012-06-24T12:51:34+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
  15. 2012-06-24T12:51:34+00:00 app[web.1]: => Call with -d to detach
  16. 2012-06-24T12:51:34+00:00 app[web.1]: >> Thin web server (v1.3.1 codename Triple Espresso)
  17. 2012-06-24T12:51:34+00:00 app[web.1]: >> Maximum connections set to 1024
  18. 2012-06-24T12:51:34+00:00 app[web.1]: >> Listening on 0.0.0.0:37816, CTRL+C to stop
  19. 2012-06-24T12:51:35+00:00 heroku[web.1]: State changed from starting to up

li9yvcax

li9yvcax1#

你迁移你的数据库了吗,如果你有的话?这是我经常遇到的问题。:-)

  1. heroku run rake db:migrate

字符串

ruyhziif

ruyhziif2#

问题是我没有显示足够的记录。一旦我运行heroku logs -n 2000(或其他一些大的数字),它就向我显示了问题的开始

相关问题