2014-11-02 169 views
0

我無法將我的應用程序部署到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= 

回答

0

我不知道你是怎麼做到的,但你有兩個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上運行我的應用程序就好了。

+0

感謝您的想法。沒有工作。 – JohnSalzarulo 2014-11-09 19:05:44

+0

@JohnSalzarulo我已經更新了對我有用的答案。 – iain 2014-11-10 15:13:52

+1

看起來像我也有這個問題。不知道這是怎麼發生的。謝謝。 – JohnSalzarulo 2014-11-13 04:42:48

3

你config.ru文件試圖加載與要求語句不存在的文件。此行require './gifinder'更改爲:

require './app' 

,或者的app.rb文件名更改爲gifinder.rb。您還應該遵循iain的建議並刪除雙重Gemfile.lock,因爲這肯定會導致問題。

你需要HTTParty也應小寫。我去拿你的回購和得到它通過改變要求對所有小寫在Heroku工作:

require 'httparty' 
+0

感謝您的想法。沒有工作。 – JohnSalzarulo 2014-11-09 19:03:48

+0

獲取您的回購,並通過更新HTTParty的需求獲取它。發佈更新了什麼對我有用。 – 2014-11-10 20:29:46

相關問題