该应用程序在开发中运行完美。
我在heroku上运行应用程序时出现应用程序崩溃错误。
在gemfile中使用ruby'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 brian@plexm.com
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=
答案 0 :(得分:-3)
日志表明Heroku正在尝试使用ruby 1.9.1部署应用程序。 Rails 4至少要求ruby 1.9.3:https://blog.engineyard.com/2013/rails-4-changes
您需要更新Gemfile
以指定1.9.3:
https://devcenter.heroku.com/articles/ruby-versions
同时尝试Gist中的步骤:https://gist.github.com/peter/3025502