试图弄清楚为什么我的rails应用程序在heroku中崩溃了?

时间:2018-02-28 03:56:51

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

我是heroku的新手,试图首次部署Rails应用程序。当我打开它时,它会崩溃。这是日志,只是想知道是否有人能理解它?

 018-02-28T03:49:38.908155+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
2018-02-28T03:49:38.908156+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
2018-02-28T03:49:38.908160+00:00 app[web.1]:    from bin/rails:9:in `require'
2018-02-28T03:49:38.917703+00:00 app[web.1]: => Booting Puma
2018-02-28T03:49:38.908161+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2018-02-28T03:49:38.908153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2018-02-28T03:49:38.917707+00:00 app[web.1]: => Rails 5.1.4 application starting in production 
2018-02-28T03:49:38.917709+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-28T03:49:38.917710+00:00 app[web.1]: Exiting
2018-02-28T03:50:00.911567+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=d5674160-7991-4e20-a8c2-9037cd14fca0 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:50:02.294872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=5aac6d0b-2974-40ac-8fc3-fd314fcedba2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2018-02-28T03:49:38.908155+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
2018-02-28T03:49:38.908156+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
2018-02-28T03:49:38.908160+00:00 app[web.1]:    from bin/rails:9:in `require'
2018-02-28T03:49:38.917703+00:00 app[web.1]: => Booting Puma
2018-02-28T03:49:38.908161+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2018-02-28T03:49:38.908153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2018-02-28T03:49:38.917707+00:00 app[web.1]: => Rails 5.1.4 application starting in production 
2018-02-28T03:49:38.917709+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-28T03:49:38.917710+00:00 app[web.1]: Exiting
2018-02-28T03:50:00.911567+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=d5
674160-7991-4e20-a8c2-9037cd14fca0 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:50:02.294872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=5aac6d0b-2974-40ac-8fc3-fd314fcedba2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2018-02-28T03:49:38.908155+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
2018-02-28T03:49:38.908156+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
2018-02-28T03:49:38.908160+00:00 app[web.1]:    from bin/rails:9:in `require'
2018-02-28T03:49:38.917703+00:00 app[web.1]: => Booting Puma
2018-02-28T03:49:38.908161+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2018-02-28T03:49:38.908153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2018-02-28T03:49:38.917707+00:00 app[web.1]: => Rails 5.1.4 application starting in production 
2018-02-28T03:49:38.917709+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-28T03:49:38.917710+00:00 app[web.1]: Exiting
2018-02-28T03:50:00.911567+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=d5
674160-7991-4e20-a8c2-9037cd14fca0 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:50:02.294872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=5aac6d0b-2974-40ac-8fc3-fd314fcedba2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:46.845758+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=f695bff2-745d-4f14-af52-55b246316e7a fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:50.098411+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=b7af71af-e036-47b3-8c35-d9f841971cd2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2018-02-28T03:49:38.908160+00:00 app[web.1]:    from bin/rails:9:in `require'
2018-02-28T03:49:38.917703+00:00 app[web.1]: => Booting Puma
2018-02-28T03:49:38.908161+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2018-02-28T03:49:38.908153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2018-02-28T03:49:38.917707+00:00 app[web.1]: => Rails 5.1.4 application starting in production 
2018-02-28T03:49:38.917709+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-28T03:49:38.917710+00:00 app[web.1]: Exiting
2018-02-28T03:50:00.911567+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=d5674160-7991-4e20-a8c2-9037cd14fca0 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:50:02.294872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=5aac6d0b-2974-40ac-8fc3-fd314fcedba2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:46.845758+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=f695bff2-745d-4f14-af52-55b246316e7a fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:50.098411+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=b7af71af-e036-47b3-8c35-d9f841971cd2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2018-02-28T03:49:38.908160+00:00 app[web.1]:    from bin/rails:9:in `require'
2018-02-28T03:49:38.917703+00:00 app[web.1]: => Booting Puma
2018-02-28T03:49:38.908161+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2018-02-28T03:49:38.908153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2018-02-28T03:49:38.917707+00:00 app[web.1]: => Rails 5.1.4 application starting in production 
2018-02-28T03:49:38.917709+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-28T03:49:38.917710+00:00 app[web.1]: Exiting
2018-02-28T03:50:00.911567+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=d5674160-7991-4e20-a8c2-9037cd14fca0 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:50:02.294872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=5aac6d0b-2974-40ac-8fc3-fd314fcedba2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:46.845758+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fidirect-api.herokuapp.com request_id=f695bff2-745d-4f14-af52-55b246316e7a fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https
2018-02-28T03:52:50.098411+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fidirect-api.herokuapp.com request_id=b7af71af-e036-47b3-8c35-d9f841971cd2 fwd="199.116.73.196" dyno= connect= service= status=503 bytes= protocol=https

1 个答案:

答案 0 :(得分:0)

您需要在本地安装postgres,因为如果没有postgres您无法安装pg gem。因此,在安装postgres安装pg gem之后,捆绑商会在您的Gemfile.lock中创建条目。 heroku的问题是在部署到heroku之前必须在本地安装所有gem,因为heroku会读取你的Gemfile.lock文件来安装依赖项。