2013-03-07 69 views
3

該應用程序在開發過程中運行得非常完美。在Heroku上運行Rails 4應用程序的問題

當我在heroku上運行應用程序時,出現應用程序崩潰錯誤。

紅寶石在Gemfile中 '1.9.3':

2013-03-07T17:52:54+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 6699 -e $RAILS_ENV` 
2013-03-07T17:52:54+00:00 heroku[slugc]: Slug compilation finished 
2013-03-07T17:52:55+00:00 app[web.1]: bash: bin/rails: No such file or directory 
2013-03-07T17:52:56+00:00 heroku[web.1]: Process exited with status 127 
2013-03-07T17:52:59+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 38670 -e $RAILS_ENV` 
2013-03-07T17:53:00+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [Ascii85-1.0.2, activerecord-deprecated_finders-0.0.3, afm-0.2.0, angular-ui-bootstrap-rails-0.1.1, angularjs-rails-1.0.5, atomic-1.0.1, bigdecimal-1.1.0, bootstrap-sass-2.3.0.1, bootswatch-rails-0.4.0, builder-3.1.4, bundler-1.3.0.pre.5, coffee-script-2.2.0, coffee-script-source-1.5.0, erubis-2.7.0, execjs-1.4.0, hashery-2.1.0, hike-1.2.1, i18n-0.6.4, io-console-0.3, json-1.7.7, json-1.5.5, mail-2.5.3, mime-types-1.21, minitest-4.6.2, minitest-2.5.1, multi_json-1.6.1, pdf-reader-1.3.1, pg-0.14.1, polyglot-0.3.3, prawn-0.12.0, rack-1.5.2, rack-test-0.6.2, rake-10.0.3, rake-0.9.2.2, rdoc-3.12.2, rdoc-3.9.5, ruby-rc4-0.1.5, sass-3.2.6, sprockets-2.9.0, sprockets-rails-2.0.0.rc3, thor-0.17.0, thread_safe-0.1.0, tilt-1.3.4, treetop-1.4.12, ttfunk-1.0.3, tzinfo-0.3.35, uglifier-1.3.0] (Gem::LoadError) 
2013-03-07T17:53:00+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' 
2013-03-07T17:53:00+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems.rb:1231:in `gem' 
2013-03-07T17:53:00+00:00 app[web.1]: from bin/rails:22:in `<main>' 
2013-03-07T17:53:02+00:00 heroku[web.1]: Process exited with status 1 
2013-03-07T17:53:02+00:00 heroku[web.1]: State changed from crashed to starting 
2013-03-07T17:53:02+00:00 heroku[web.1]: State changed from starting to crashed 
2013-03-07T17:53:09+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by [email protected] 
2013-03-07T17:53:10+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 11069 -e $RAILS_ENV` 
2013-03-07T17:53:11+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [Ascii85-1.0.2, activerecord-deprecated_finders-0.0.3, afm-0.2.0, angular-ui-bootstrap-rails-0.1.1, angularjs-rails-1.0.5, atomic-1.0.1, bigdecimal-1.1.0, bootstrap-sass-2.3.0.1, bootswatch-rails-0.4.0, builder-3.1.4, bundler-1.3.0.pre.5, coffee-script-2.2.0, coffee-script-source-1.5.0, erubis-2.7.0, execjs-1.4.0, hashery-2.1.0, hike-1.2.1, i18n-0.6.4, io-console-0.3, json-1.7.7, json-1.5.5, mail-2.5.3, mime-types-1.21, minitest-4.6.2, minitest-2.5.1, multi_json-1.6.1, pdf-reader-1.3.1, pg-0.14.1, polyglot-0.3.3, prawn-0.12.0, rack-1.5.2, rack-test-0.6.2, rake-10.0.3, rake-0.9.2.2, rdoc-3.12.2, rdoc-3.9.5, ruby-rc4-0.1.5, sass-3.2.6, sprockets-2.9.0, sprockets-rails-2.0.0.rc3, thor-0.17.0, thread_safe-0.1.0, tilt-1.3.4, treetop-1.4.12, ttfunk-1.0.3, tzinfo-0.3.35, uglifier-1.3.0] (Gem::LoadError) 
2013-03-07T17:53:11+00:00 app[web.1]: from bin/rails:22:in `<main>' 
2013-03-07T17:53:11+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' 
2013-03-07T17:53:11+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/rubygems.rb:1231:in `gem' 
2013-03-07T17:53:12+00:00 heroku[web.1]: Process exited with status 1 
2013-03-07T17:53:12+00:00 heroku[web.1]: State changed from starting to crashed 
2013-03-07T17:53:15+00:00 heroku[run.3892]: Awaiting client 
2013-03-07T17:53:15+00:00 heroku[run.3892]: Starting process with command `bundle exec rake db:migrate` 
2013-03-07T17:53:15+00:00 heroku[run.3892]: State changed from starting to up 
2013-03-07T17:53:24+00:00 heroku[run.3892]: Client connection closed. Sending SIGHUP to all processes 
2013-03-07T17:53:25+00:00 heroku[run.3892]: State changed from up to complete 
2013-03-07T17:53:25+00:00 heroku[run.3892]: Process exited with status 0 
2013-03-07T17:53:29+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=bpetro.herokuapp.com fwd="99.104.137.64" dyno= queue= wait= connect= service= status=503 bytes= 
2013-03-07T17:53:30+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bpetro.herokuapp.com fwd="99.104.137.64" dyno= queue= wait= connect= service= status=503 bytes= 
2013-03-07T17:53:30+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bpetro.herokuapp.com fwd="99.104.137.64" dyno= queue= wait= connect= service= status=503 bytes= 

回答

-3

日誌表明,Heroku的是嘗試部署使用Ruby 1.9.1的應用程序。軌道4需要Ruby 1.9.3最低:https://blog.engineyard.com/2013/rails-4-changes

你需要更新你的Gemfile指定1.9.3:

https://devcenter.heroku.com/articles/ruby-versions

也可以嘗試以下步驟,要點是:https://gist.github.com/peter/3025502

+0

我已經嘗試過我發佈了第一個heroku實例的日誌。我做了另一個heroku實例,從一開始就添加了1.9.3。我仍然有一個問題。我在原始帖子中發佈了日誌。也許是因爲1.9.1仍然被稱爲某個地方? – 2013-03-07 17:57:49

+0

我爲了讓Rails 4在Heroku上運行所採取的步驟的答案添加了一個要點。希望有所幫助。 – 2013-03-07 18:10:42

+0

我想指出,別人創造了一個答案,說他們遇到了同樣的問題。這篇文章後來被刪除,可能是因爲缺乏幫助。 – 2013-03-09 01:18:45

相關問題