Sinatra应用程序未部署到Heroku,机架崩溃 [英] Sinatra app not deploying to Heroku, rackup crashed

查看:120
本文介绍了Sinatra应用程序未部署到Heroku,机架崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  require'./app'
运行Sinatra: :申请

Gemfile

  source'http://rubygems.org'

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

Procfile

  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]:从/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250 :在`开始'
2013-08-10T01:21:03.754180 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2 /lib/rack/server.rb:141:in`start'
2013-08-10T01:21:03.75418 0 + 00:00 app [web.1]:从/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]:状态从开始变为崩溃
2013-08-10T01:21:04.790161 + 00:00 heroku [web.1 ]:进程退出状态1
2013-08-10T01:21:25.615653 + 00:00 heroku [router]:at = error code = H10 desc =应用程序崩溃method = GET path = / host = beer -voter.herokuapp.com fwd =98.173.1.66dyno = connect = service = status = 503 bytes =
2013-08-10T01:22:57.223684 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / host = beer-voter.herokuapp.com fwd =98.173.1.66dyno = connect = service = status = 503 bytes =
2013-08-10T01 :24:34.417907 + 00:00 heroku [api]:用命令`bundle exec rake db:migrate`启动进程jgallardo720@gmail.com
2013-08-10T01:24:39.051510 + 00:00 heroku [ run.1200]:等待客户
2013-08-10T01:24:39.073013 + 00:00 heroku [run.1200]:用命令`bundle exec rake db:migr启动进程ate`
2013-08-10T01:24:41.746057 + 00:00 heroku [run.1200]:状态从开始改为
2013-08-10T01:24:46.0​​02914 + 00:00 heroku [run.1200]:进程已退出,状态为1
2013-08-10T01:24:46.0​​18585 + 00:00 heroku [run.1200]:状态从最高改为完成
2013-08-10T01 :26:31.150052 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / host = beer-voter.herokuapp.com fwd =98.173.1.66dyno = connect = service = status = 503 bytes =
2013-08-10T01:29:07.598813 + 00:00 heroku [web.1]:状态从崩溃状态变为开始
2013-08-10T01:29: 11.616194 + 00:00 heroku [web.1]:用命令`bundle exec rackup config.ru -p 26270`启动程序
2013-08-10T01:29:15.827320 + 00:00 app [web.1] :/app/config.ru:1:in`require':无法加载这样的文件 - ./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 /束/红宝石/ 2.0。 0 / gems / rack-1.5.2 / lib / rack / builder.rb:55:在`instance_eval'
2013-08-10T01:29:15.827320 + 00:00 app [web.1]:from / app / config.ru:在`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应用[web.1]:从/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder .rb:40:在`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:在`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]:从/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]:从/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in`eval'
2013-08-1 0T01: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:`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:在`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:在`start'
2013-08-10T01:29:15.827512 + 00:00 app [web.1]:从/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]:状态改变了从开始到崩溃
2013-08-10T01:29:17.455240 + 00:00 heroku [web.1]:进程退出状态1
2013-08-10T01:39:12.643653 + 00:00 heroku [web.1]:从崩溃状态变为开始
2013-08-10T01:39:15.630798 + 00:00 heroku [web.1]:使用命令`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':无法加载这样的文件 - ./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:在`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]:从/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:'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:`wrapped_app'
2013-08-10T01:39:17.108500 + 00:00 app [web.1]:from / app / vendor / bundle /红宝石/ 2.0.0 /宝石/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]:从/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]:从/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]:进程退出状态1
2013-08-10T01:39:18.624453 + 00:00 heroku [web.1]:状态从启动坠毁
2013-08-10T01:49:20.129509 + 00:00 heroku [web.1]:状态从坠毁改为开始
2013-08-10T01:49:25.310821 + 00:00 heroku [web.1]:使用命令`bundle exec rackup config.ru -p 31607`开始处理
2013-08-10T01:49:29.293008 + 00:00 ap p [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':无法加载这样的文件 - ./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]:从/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]:从/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]:fr om /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]:从/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:在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:在<顶部(必填)>'
2013-08-10T01:49:29.293225 + 00:00应用[web.1]:从/ 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应用[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]:进程退出状态1
2013-08-10T01:49:30.787136 + 00:00 heroku [web.1]:状态从开始崩溃到
2013-08-10T01:59:30.949128 + 00:00 heroku [web.1]:从崩溃状态变为开始
2013-08-10T01:59:34.018512 + 00:00 heroku [web.1]:使用命令`bundle exec rackup config.ru -p 53386`开始进程
2013-08-10T01:59:35.253202 + 00:00 app [web.1]:/app/config.ru:1:in` require':无法加载这样的文件 - ./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:在`instance_eval'
2013-08-10T01:59:35 .253202 + 00:00 app [web.1]:从/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:在`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]:从/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:在`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 /宝石/机架1。 5.2 / lib / rack / server.rb:314:`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:在`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]:状态从开始变为崩溃
2013-08-10T01:59:36.501648 + 00:00 heroku [web.1 ]:进程退出状态1
2013-08-10T01:59:35.253385 + 00:00应用[web.1]:从/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5 0.2 / LIB /齿条/ SERV er.rb:199:'app'
2013-08-10T02:00:18.345271 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / host = beer-voter.herokuapp.com fwd =98.173.1.66dyno = connect = service = status = 503 bytes =
2013-08-10T02:02:01.913591 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / host = beer-voter.herokuapp.com fwd =98.173.1.66dyno = connect = service = status = 503 bytes =

是的,这个应用程序在本地工作



当我运行 heroku ps 我得到这个错误

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


解决方案

这两行似乎表明了这个问题:

  2013-08-10T01:29:15.827320 +00:00 app [web.1]:/app/config.ru:1:in`require':无法加载这样的文件 -  ./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中。添加此文件(以及您的应用使用的任何其他文件),提交并再次推送: $ b

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


config.ru

require './app'
run Sinatra::Application

Gemfile

source 'http://rubygems.org'

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

Procfile

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

Here are my heroku logs

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=

And yes, this app is working locally

When I ran heroku ps I get this error

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

解决方案

These two lines seem to be indicating the problem:

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>'

The app is trying to load your app.rb file, but it isn’t there. The fact that your app is working locally suggests that this file hasn’t been added to git. Add this file (and any others your app uses), commit, and then push again:

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

这篇关于Sinatra应用程序未部署到Heroku,机架崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆