将Sinatra应用程序部署到Heroku时出现错误H10
我无法将我的应用程序部署到Heroku。太令人沮丧了。将Sinatra应用程序部署到Heroku时出现错误H10
这里是仓库:repository link
事情我已经尝试:
- 我已经更新了我的一切,我每Heroku的部署页面需要config.ru发现here
- 我已经运行
heroku run rake db:migrate
- 我已经运行
heroku restart
- 我确保我有更新的gemfile
- 我仔细检查了,我有我的app.rb
任何思想的“需要”的语句?我的错误日志我得到低于:
2014-11-02T03:46:07.404128+00:00 heroku[api]: Deploy bbe19c1 by [email protected]
2014-11-02T03:46:07.404202+00:00 heroku[api]: Release v17 created by [email protected]
2014-11-02T03:46:08.439283+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-02T03:46:11.353727+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 43798`
2014-11-02T03:46:13.210413+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-11-02T03:46:13.210411+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-11-02T03:46:13.210388+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./gifinder (LoadError)
2014-11-02T03:46:13.210410+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2014-11-02T03:46:13.210424+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-11-02T03:46:13.210425+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-11-02T03:46:13.210414+00:00 app[web.1]: from /app/config.ru:in `new'
2014-11-02T03:46:13.210415+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-11-02T03:46:13.210417+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-11-02T03:46:13.210419+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-11-02T03:46:13.210418+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-11-02T03:46:13.210421+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-11-02T03:46:13.210427+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-11-02T03:46:13.210430+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2014-11-02T03:46:13.210432+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2014-11-02T03:46:13.210434+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/rackup:23:in `load'
2014-11-02T03:46:13.210437+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/rackup:23:in `<main>'
2014-11-02T03:46:13.977897+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-02T03:46:13.970947+00:00 heroku[web.1]: Process exited with status 1
2014-11-02T03:46:15.252296+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gifinder.herokuapp.com request_id=7106f663-fa15-4c74-ab8e-f5df75030a55 fwd="174.129.111.111" dyno= connect= service= status=503 bytes=
2014-11-02T03:46:42.265175+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gifinder.herokuapp.com request_id=900cbb04-7ee9-4392-9f2f-7d4e833b15c0 fwd="24.43.108.83" dyno= connect= service= status=503 bytes=
2014-11-02T03:46:43.407062+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gifinder.herokuapp.com request_id=ce46eed0-4a7f-4633-81ec-c826a3c90e30 fwd="24.43.108.83" dyno= connect= service= status=503 bytes=
我不知道你是怎么做到的,但你有两个Gemfile.lock
秒。我会删除它们并重新运行Bundler,并且git rm
应该不在那里。
另请注意,Heroku现在比以前更广泛地使用procfiles,因此可以掌握Foreman和define a procfile。
此外,当我运行bundle install --binstubs --path=vendor
我得到这个消息:
安装后从Heroku的消息!
heroku
宝石已被 弃用,取而代之的是Heroku Toolbelt。 !下载和 从:https://toolbelt.heroku.com安装!对于API访问,请参阅: https://github.com/heroku/heroku.rb
所以从Gemfile中和require 'heroku'
从app.rb.(这是从来没有在应用程序需要无论如何)删除gem 'heroku', '~> 3.15.0'
当我这样做时,命令bin/rackup config.ru
在localhost:9292上运行我的应用程序就好了。
你config.ru文件试图加载与要求语句不存在的文件。此行require './gifinder'
更改为:
require './app'
,或者的app.rb
文件名更改为gifinder.rb
。您还应该遵循iain的建议并删除双重Gemfile.lock,因为这肯定会导致问题。
你需要HTTParty也应小写。我去拿你的回购和得到它通过改变要求对所有小写在Heroku工作:
require 'httparty'
感谢您的想法。没有工作。 – JohnSalzarulo 2014-11-09 19:03:48
获取您的回购,并通过更新HTTParty的需求获取它。发布更新了什么对我有用。 – 2014-11-10 20:29:46
感谢您的想法。没有工作。 – JohnSalzarulo 2014-11-09 19:05:44
@JohnSalzarulo我已经更新了对我有用的答案。 – iain 2014-11-10 15:13:52
看起来像我也有这个问题。不知道这是怎么发生的。谢谢。 – JohnSalzarulo 2014-11-13 04:42:48