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

时间:2012-06-24 13:08:32

标签: ruby-on-rails heroku

好的,所以我将一个非常基本的应用程序部署到Heroku。我跟着tutorial写了这封信。关于这次部署的一切都是教科书,但当我在Heroku上打开网站时,我收到了令人沮丧的模糊信息"我们很抱歉,但出了点问题。"

当我做" heroku ps"它说:

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

当我跑" heroku日志"我得到通常的弃用消息,然后是下面的文本。但我在这些日志中看不到会导致应用崩溃的红旗。我错过了什么吗?

    2012-06-24T12:50:50+00:00 heroku[slugc]: Slug compilation started
    2012-06-24T12:51:25+00:00 heroku[api]: Release v9 created by bd@bendowney.net
    2012-06-24T12:51:25+00:00 heroku[api]: Deploy ff89ee6 by bd@bendowney.net
    2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from up to bouncing
    2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from bouncing to created
    2012-06-24T12:51:25+00:00 heroku[web.1]: State changed from created to starting
    2012-06-24T12:51:25+00:00 heroku[slugc]: Slug compilation finished
    2012-06-24T12:51:27+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 37816 -e production`
    2012-06-24T12:51:27+00:00 heroku[web.1]: Stopping all processes with SIGTERM
    2012-06-24T12:51:28+00:00 app[web.1]: Exiting
    2012-06-24T12:51:29+00:00 heroku[web.1]: Process exited with status 0
    2012-06-24T12:51:34+00:00 app[web.1]: => Booting Thin
    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
    2012-06-24T12:51:34+00:00 app[web.1]: => Ctrl-C to shutdown server
    2012-06-24T12:51:34+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
    2012-06-24T12:51:34+00:00 app[web.1]: => Call with -d to detach
    2012-06-24T12:51:34+00:00 app[web.1]: >> Thin web server (v1.3.1 codename Triple Espresso)
    2012-06-24T12:51:34+00:00 app[web.1]: >> Maximum connections set to 1024
    2012-06-24T12:51:34+00:00 app[web.1]: >> Listening on 0.0.0.0:37816, CTRL+C to stop
    2012-06-24T12:51:35+00:00 heroku[web.1]: State changed from starting to up

2 个答案:

答案 0 :(得分:1)

您是否迁移了数据库(如果有的话)?这通常会吸引我。 : - )

heroku run rake db:migrate

答案 1 :(得分:0)

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