Heroku上的Rails应用程序部署收到错误

时间:2017-03-22 11:09:46

标签: mysql ruby-on-rails ruby heroku

我使用mysql将我的rails应用程序部署在heroku上作为db.It说我们很抱歉,但出了点问题。 在这里,我正在添加我的heroku日志,有些人帮助我。

2017-03-22T10:43:48.752701+00:00 app[web.1]:    bin/rails:9:in `<main>'
2017-03-22T10:43:48.752807+00:00 app[web.1]: [2017-03-22 10:43:48] INFO  WEBrick::HTTPServer#start done.
2017-03-22T10:43:48.790015+00:00 app[web.1]: => Booting WEBrick
2017-03-22T10:43:48.752761+00:00 app[web.1]: [2017-03-22 10:43:48] INFO  going to shutdown ...
2017-03-22T10:43:48.790019+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:14662
2017-03-22T10:43:48.790024+00:00 app[web.1]: Exiting
2017-03-22T10:43:48.790020+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-03-22T10:43:48.790020+00:00 app[web.1]: => Ctrl-C to shutdown server
2017-03-22T10:43:48.890675+00:00 heroku[web.1]: Process exited with status 143
2017-03-22T10:43:51.674432+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 52776 -e production`
2017-03-22T10:43:56.654276+00:00 app[web.1]: [2017-03-22 10:43:56] INFO  WEBrick 1.3.1
2017-03-22T10:43:56.657326+00:00 app[web.1]: [2017-03-22 10:43:56] INFO  ruby 2.2.6 (2016-11-15) [x86_64-linux]
2017-03-22T10:43:56.657804+00:00 app[web.1]: [2017-03-22 10:43:56] INFO  WEBrick::HTTPServer#start: pid=4 port=52776
2017-03-22T10:43:56.776993+00:00 heroku[web.1]: State changed from starting to up
2017-03-22T10:44:10.744223+00:00 heroku[router]: at=info method=GET path="/" host=tranquil-ridge-41580.herokuapp.com request_id=e39fe9d2-3d4d-4d70-a130-cb81b3b17d47 fwd="183.82.43.238" dyno=web.1 connect=0ms service=10ms status=500 bytes=1754 protocol=https

4 个答案:

答案 0 :(得分:1)

Heroku原生使用postgres。如果你在当地使用它,生活会更容易。

答案 1 :(得分:0)

答案 2 :(得分:0)

在你的gemfile中包含

group :production do
  gem "pg"
  gem "rails_12factor"
end

答案 3 :(得分:0)

在heroku上,只有pg数据库可用,因此在gmfile中添加以下代码

的Gemfile

group :production do
  gem "pg"
end

然后运行

bundle install
相关问题