Ruby on rails RubyonRails教程Michael Hartl第2章练习(演示应用程序):应用程序可以在Windows 8 localhost上运行,但不能';我不在Heroku工作

Ruby on rails RubyonRails教程Michael Hartl第2章练习(演示应用程序):应用程序可以在Windows 8 localhost上运行,但不能';我不在Heroku工作,ruby-on-rails,windows,heroku,Ruby On Rails,Windows,Heroku,我是网络开发新手,我正在努力学习RoR。我的问题在第二章(demo_应用程序,一个类似使用脚手架的微博) demo_应用程序在localhost:3000上运行良好,但当我将其推送到Heroku时,它不起作用(索引和/users或/microscops),并显示以下消息: *“应用程序错误 应用程序中出现错误,无法提供您的页面。请稍后再试 如果您是应用程序所有者,请查看日志以了解详细信息。”* 这是Heroku的日志: 2013-07-18T23:45:15+00:00 heroku[slug-

我是网络开发新手,我正在努力学习RoR。我的问题在第二章(demo_应用程序,一个类似使用脚手架的微博)

demo_应用程序在localhost:3000上运行良好,但当我将其推送到Heroku时,它不起作用(索引和/users或/microscops),并显示以下消息:

*“应用程序错误 应用程序中出现错误,无法提供您的页面。请稍后再试

如果您是应用程序所有者,请查看日志以了解详细信息。”*

这是Heroku的日志:

2013-07-18T23:45:15+00:00 heroku[slug-compiler]: Slug compilation started
2013-07-18T23:47:13.079550+00:00 heroku[api]: Scale to web=1 by sergio.schuler@gmail.com
2013-07-18T23:47:14.164452+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_COBALT resource by sergio.schuler@gmail.com
2013-07-18T23:47:14.198422+00:00 heroku[api]: Release v3 created by sergio.schuler@gmail.com
2013-07-18T23:47:14.289007+00:00 heroku[api]: Add DATABASE_URL config by sergio.schuler@gmail.com
2013-07-18T23:47:14.315343+00:00 heroku[api]: Release v4 created by sergio.schuler@gmail.com
2013-07-18T23:47:14.368054+00:00 heroku[api]: Deploy 5c359d1 by sergio.schuler@gmail.com
2013-07-18T23:47:14.404636+00:00 heroku[api]: Release v5 created by sergio.schuler@gmail.com
2013-07-18T23:47:14.455717+00:00 heroku[api]: Deploy 5c359d1 by sergio.schuler@gmail.com
2013-07-18T23:47:15+00:00 heroku[slug-compiler]: Slug compilation finished
2013-07-18T23:47:24.815578+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-18T23:47:24.816243+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-18T23:47:29.239184+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40177 -e $RAILS_ENV`
2013-07-18T23:47:30.141486+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-07-18T23:47:32.030497+00:00 heroku[web.1]: Process exited with status 127
2013-07-18T23:47:32.047706+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-18T23:47:33.081140+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:47:33.459600+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:47:39.437747+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-07-18T23:47:39.437747+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-07-18T23:48:39.904762+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by sergio.schuler@gmail.com
2013-07-18T23:48:43.962916+00:00 heroku[run.7255]: Awaiting client
2013-07-18T23:48:44.045577+00:00 heroku[run.7255]: Starting process with command `bundle exec rake db:migrate`
2013-07-18T23:48:45.332120+00:00 heroku[run.7255]: State changed from starting to up
2013-07-18T23:48:49.566475+00:00 heroku[run.7255]: Process exited with status 0
2013-07-18T23:48:49.575731+00:00 heroku[run.7255]: State changed from up to complete
2013-07-18T23:49:12.500850+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="
200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:16.494827+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="
200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:18.188864+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/users host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:18.523155+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="
200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:20.389909+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/users host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:20.706606+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="
200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:19.925876+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:21.662834+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/users host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:49:21.973127+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-hamlet-1820.herokuapp.com fwd="200.102.212.90" dyno= connect= service= status=503 bytes=
2013-07-18T23:58:04.507344+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-18T23:58:07.786500+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 32660 -e $RAILS_ENV`
2013-07-18T23:58:08.981452+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-07-18T23:58:10.252381+00:00 heroku[web.1]: Process exited with status 127
2013-07-18T23:58:10.273793+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-19T00:08:40.833356+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-19T00:08:44.112189+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 21751 -e $RAILS_ENV`
2013-07-19T00:08:46.119816+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-07-19T00:08:47.198086+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-19T00:08:47.181492+00:00 heroku[web.1]: Process exited with status 127
2013-07-19T00:19:17.976344+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-19T00:19:21.334982+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 35103 -e $RAILS_ENV`
2013-07-19T00:19:21.887922+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-07-19T00:19:22.932515+00:00 heroku[web.1]: Process exited with status 127
2013-07-19T00:19:31.846924+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-07-19T00:19:31.847214+00:00 heroku[web.1]: Stopping process with SIGKILL
以下是存储库:

我也试过:

bundle exec rake assets:precompile
git add .
git commit -am "add a note reflecting changes made"
git push
heroku create
git push heroku master
heroku rake db:migrate
heroku db:push
(最终,我的本地应用程序实现了收支平衡,所以我回滚了)

我正在使用Windows 8并安装Railsinstaller

抱歉,如果缺少一些信息,我对这一切还是有点陌生。

错误在这里:

2013-07-18T23:47:29.239184+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40177 -e $RAILS_ENV`
2013-07-18T23:47:30.141486+00:00 app[web.1]: bash: bin/rails: No such file or directory
尝试向具有以下内容的应用程序添加:

web: bundle exec rails server -p $PORT

我运行了
web:bundle-exec-rails-server-p$PORT
但得到了一个错误
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands/server.rb:33:in
parse!':无效参数:-p$PORT(OptionParser::InvalidArgument)`该参数应位于名为Procfile的文件的内容中,提交给您的repo,然后推送到Heroku.WORKED!:D我希望我能明白这是怎么回事,但我想现在这就够了。:)谢谢你,我链接的那篇文章已经解释过了: