Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 推送时Heroku发出模糊的错误消息,日志无效_Ruby On Rails_Ruby_Heroku - Fatal编程技术网

Ruby on rails 推送时Heroku发出模糊的错误消息,日志无效

Ruby on rails 推送时Heroku发出模糊的错误消息,日志无效,ruby-on-rails,ruby,heroku,Ruby On Rails,Ruby,Heroku,所以我使用的是Rails 4.0和Ruby 2.0。我的应用程序在本地运行,我只是想把它推到Heroku。当我按下它时,我的终端显示一切正常。但是,当我运行“Heroku open”时,会收到以下错误消息: “应用程序错误 应用程序中出现错误,无法提供您的页面。请稍后再试 如果您是应用程序所有者,请查看日志以了解详细信息。” 所以我检查了我的Heroku日志,得到了以下信息: 2013-10-09T18:11:04+00:00 heroku[slug-compiler]: Slug compil

所以我使用的是Rails 4.0和Ruby 2.0。我的应用程序在本地运行,我只是想把它推到Heroku。当我按下它时,我的终端显示一切正常。但是,当我运行“Heroku open”时,会收到以下错误消息:

“应用程序错误

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

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

所以我检查了我的Heroku日志,得到了以下信息:

2013-10-09T18:11:04+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T18:44:51+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T18:52:38.087581+00:00 heroku[web.1]: Idling
2013-10-09T18:52:42.873303+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-10-09T18:52:44.057184+00:00 app[web.1]:    /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2013-10-09T18:52:44.057184+00:00 app[web.1]: [2013-10-09 18:52:44] ERROR SignalException: SIGTERM
2013-10-09T18:52:52.698902+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-10-09T18:52:52.699100+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-10-09T18:52:55.089017+00:00 heroku[web.1]: Process exited with status 137
2013-10-09T18:52:55.117506+00:00 heroku[web.1]: State changed from up to down
2013-10-09T19:09:30+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:09:56+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T19:12:56+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:13:19+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T19:14:39+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:15:08+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T19:17:15+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:17:43+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T19:18:02+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:18:24+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-10-09T19:20:12+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:21:40.262707+00:00 heroku[web.1]: State changed from down to starting
2013-10-09T19:21:40+00:00 heroku[slug-compiler]: Slug compilation finished
2013-10-09T19:21:45.164416+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 51664 -e $RAILS_ENV`
2013-10-09T19:21:45.824512+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:21:47.372719+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:21:47.374233+00:00 heroku[web.1]: State changed from crashed to starting
2013-10-09T19:21:47.360556+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:21:52.782769+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 21782 -e $RAILS_ENV`
2013-10-09T19:21:53.632718+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:21:55.247743+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:21:55.260010+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:22:00.902528+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:15.746476+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:19.270286+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:19.314670+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:17.799045+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:24:19.549828+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:24:22.196517+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:24:22.302682+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:19.122401+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:17.689844+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:25:40.152185+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:25:40.254083+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:22:18.422342+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:25:48.595371+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/simulation host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:25:48.706113+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:24:19.441344+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:29:30.447734+00:00 heroku[web.1]: State changed from crashed to starting
2013-10-09T19:29:39.212672+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 8011 -e $RAILS_ENV`
2013-10-09T19:29:40.275800+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:29:41.536523+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:29:41.553119+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:29:43.142915+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:29:49.393166+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-10-09T19:29:49.393401+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-10-09T19:30:32.885333+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by benjamin_clayman@alumni.brown.edu
2013-10-09T19:30:40.320116+00:00 heroku[run.5508]: Awaiting client
2013-10-09T19:30:40.377694+00:00 heroku[run.5508]: Starting process with command `bundle exec rake db:migrate`
2013-10-09T19:30:41.612272+00:00 heroku[run.5508]: State changed from starting to up
2013-10-09T19:30:51.132253+00:00 heroku[run.5508]: Process exited with status 0
2013-10-09T19:30:51.164260+00:00 heroku[run.5508]: State changed from up to complete
2013-10-09T19:31:07.432378+00:00 heroku[api]: Starting process with command `bundle exec rake db:seed` by benjamin_clayman@alumni.brown.edu
2013-10-09T19:31:14.013906+00:00 heroku[run.1827]: Awaiting client
2013-10-09T19:31:14.080713+00:00 heroku[run.1827]: Starting process with command `bundle exec rake db:seed`
2013-10-09T19:31:15.414436+00:00 heroku[run.1827]: State changed from starting to up
2013-10-09T19:31:19.041011+00:00 heroku[run.1827]: Process exited with status 1
2013-10-09T19:31:19.056727+00:00 heroku[run.1827]: State changed from up to complete
2013-10-09T19:32:08.619874+00:00 heroku[web.1]: State changed from crashed to starting
2013-10-09T19:32:11.337276+00:00 heroku[api]: Starting process with command `bundle exec rake db:seed` by benjamin_clayman@alumni.brown.edu
2013-10-09T19:32:14.419913+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 10397 -e $RAILS_ENV`
2013-10-09T19:32:15.072660+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:32:16.194007+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:32:16.208094+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:32:21.776095+00:00 heroku[run.5181]: Awaiting client
2013-10-09T19:32:21.872776+00:00 heroku[run.5181]: Starting process with command `bundle exec rake db:seed`
2013-10-09T19:32:22.981513+00:00 heroku[run.5181]: State changed from starting to up
2013-10-09T19:32:27.556289+00:00 heroku[run.5181]: Client connection closed. Sending SIGHUP to all processes
2013-10-09T19:32:29.032961+00:00 heroku[run.5181]: Process exited with status 1
2013-10-09T19:32:29.087562+00:00 heroku[run.5181]: State changed from up to complete
2013-10-09T19:42:43.713377+00:00 heroku[web.1]: State changed from crashed to starting
2013-10-09T19:42:48.645184+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 4793 -e $RAILS_ENV`
2013-10-09T19:42:49.240477+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:42:50.587908+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:42:50.602229+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:42:46+00:00 heroku[slug-compiler]: Slug compilation started
2013-10-09T19:43:18.483470+00:00 heroku[api]: Deploy 22ad50c by benjamin_clayman@alumni.brown.edu
2013-10-09T19:43:18.496059+00:00 heroku[api]: Release v19 created by benjamin_clayman@alumni.brown.edu
2013-10-09T19:43:18.648420+00:00 heroku[web.1]: State changed from crashed to starting
2013-10-09T19:43:18+00:00 heroku[slug-compiler]: Slug compilation finished
2013-10-09T19:43:24.039482+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 37273 -e $RAILS_ENV`
2013-10-09T19:43:24.917501+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-10-09T19:43:26.321155+00:00 heroku[web.1]: Process exited with status 127
2013-10-09T19:43:26.339466+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-09T19:43:34.291081+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-10-09T19:43:34.291514+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-10-09T19:43:54.377170+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:43:57.816484+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:43:58.025631+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:43:59.803749+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
2013-10-09T19:43:59.891121+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=rocky-brushlands-1229.herokuapp.com fwd="72.74.241.162" dyno= connect= service= status=503 bytes=
看起来应用程序正在崩溃(错误代码为H10),但我不知道为什么

任何帮助都将不胜感激;已经尝试让这个应用程序在线太久了

谢谢, 马里奥格斯

下面是我尝试加载“/ladder”页面时的日志:

我不知道为什么@ladder实例变量看起来是空的…

错误很明显:

bash: bin/rails: No such file or directory
Rails 4需要一个bin目录 它甚至为您提供了一个方便的rake任务

 rake rails:update:bin
以后请查阅Heroku文档


可能重复:好消息:/simulation在我运行后现在可以工作了“heroku pg:重置。因此,唯一需要修复的是/ladder页面。它在本地工作,我没有在日志中发现任何错误。基本上,我只是将一个玩家名称数组存储在一个数组中,将保存该数组的实例变量传递给/ladder,并在其中循环以创建一个有序列表。不知道赫罗库为什么不喜欢……谢谢你的回答,@TheIrishGuy。所以我们肯定会有所进展。我照你说的做了,现在我的应用程序(有点)在Heroku上。但是,这两个主页(/simulation和/ladder)不起作用/模拟显示“我们很抱歉,但出了问题”,而/ladder什么也不显示。我已经将一个实例变量传递给/ladder的视图,并循环通过它来显示一个有序列表。很高兴发布Heroku日志(虽然不确定在何处执行此操作)…更新:添加了Heroku日志,以便在我尝试访问/ladder和/simulation时使用。请参见原始问题。再次感谢大家的帮助。接下来,您需要运行迁移,heroku pg数据库中不存在“排名”。如果您正在使用资产管道,请尝试在CL处重新启动heroku,以解决丢失的资产问题。明白了,所以我刚刚这么做了,我的日志显示一切正常,但是,当我运行heroku open时,我在/ladder和/simulation上遇到了相同的问题。你介意看看上面的日志吗?你能在生产模式下本地运行你的应用程序吗?rails s-e生产并没有错误?在所有这些之后,它可能会成为一个配置问题,因为您有两个不同的东西“排名”在您的数据库中不存在,所以它要么是代码中的错误,要么是数据库中的错误。此外,还有资产缺失问题(所有这些都在日志中)
 rake rails:update:bin