gpt4 book ai didi

ruby - Sinatra 应用程序未部署到 Heroku,rackup 崩溃

转载 作者:数据小太阳 更新时间:2023-10-29 08:00:22 26 4
gpt4 key购买 nike

config.ru

require './app'
run Sinatra::Application

gem 文件

source 'http://rubygems.org'

gem 'heroku'
gem 'sinatra'
gem 'thin'

配置文件

web: bundle exec rackup config.ru -p $PORT

这是我的 heroku 日志

2013-08-10T01:21:03.753984+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:21:04.799863+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:21:04.790161+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:21:25.615653+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:22:57.223684+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:24:34.417907+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by jgallardo720@gmail.com
2013-08-10T01:24:39.051510+00:00 heroku[run.1200]: Awaiting client
2013-08-10T01:24:39.073013+00:00 heroku[run.1200]: Starting process with command `bundle exec rake db:migrate`
2013-08-10T01:24:41.746057+00:00 heroku[run.1200]: State changed from starting to up
2013-08-10T01:24:46.002914+00:00 heroku[run.1200]: Process exited with status 1
2013-08-10T01:24:46.018585+00:00 heroku[run.1200]: State changed from up to complete
2013-08-10T01:26:31.150052+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:29:07.598813+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:29:11.616194+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 26270`
2013-08-10T01:29:15.827320+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:29:15.827799+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:29:17.475127+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:29:17.455240+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:39:12.643653+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:39:15.630798+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 26323`
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:39:17.108286+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:39:18.608414+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:39:18.624453+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:49:20.129509+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:49:25.310821+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 31607`
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:49:29.293008+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:49:30.776901+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:49:30.787136+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:59:30.949128+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:59:34.018512+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 53386`
2013-08-10T01:59:35.253202+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:59:36.518901+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:59:36.501648+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T02:00:18.345271+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T02:02:01.913591+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=

是的,这个应用程序在本地运行

beer voter running locally

当我运行 heroku ps 时出现此错误

=== web (1X): `bundle exec rackup config.ru -p $PORT`
web.1: crashed 2013/08/09 19:10:11 (~ 8m ago)

最佳答案

这两行似乎说明了问题:

2013-08-10T01:29:15.827320+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'

该应用正在尝试加载您的 app.rb 文件,但它不存在。您的应用程序在本地运行的事实表明该文件尚未添加到 git。添加此文件(以及您的应用使用的任何其他文件),提交,然后再次推送:

$ git add app.rb
$ git commit
$ git push heroku master

关于ruby - Sinatra 应用程序未部署到 Heroku,rackup 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18157885/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com