gpt4 book ai didi

ruby-on-rails - 在 Heroku 上获取 "/usr/bin/env: ruby.exe: No such file or directory"

转载 作者:行者123 更新时间:2023-12-05 08:17:38 26 4
gpt4 key购买 nike

刚刚部署了一个应用程序,但我得到的在线消息是:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details."

这是日志中的示例,但我无法找出问题所在。

$ heroku logs
←[36m2013-08-25T20:08:28.849427+00:00 heroku[web.1]:←[0m State changed from cras
hed to starting
←[36m2013-08-25T20:08:34.637820+00:00 heroku[web.1]:←[0m Starting process with c
ommand `bin/rails server -p 47444 -e $RAILS_ENV`
←[36m2013-08-25T20:08:35.451207+00:00 app[web.1]:←[0m /usr/bin/env: ruby.exe: No
such file or directory
←[36m2013-08-25T20:08:37.130015+00:00 heroku[web.1]:←[0m Process exited with sta
tus 127
←[36m2013-08-25T20:08:37.144978+00:00 heroku[web.1]:←[0m State changed from star
ting to crashed
←[36m2013-08-25T20:08:44.946201+00:00 heroku[web.1]:←[0m Error R99 (Platform err
or) -> Failed to launch the dyno within 10 seconds
←[36m2013-08-25T20:08:44.946616+00:00 heroku[web.1]:←[0m Stopping process with S
IGKILL
←[36m2013-08-25T20:18:37.449495+00:00 heroku[web.1]:←[0m State changed from cras
hed to starting
←[36m2013-08-25T20:18:41.670955+00:00 heroku[web.1]:←[0m Starting process with c
ommand `bin/rails server -p 24333 -e $RAILS_ENV`
←[36m2013-08-25T20:18:42.269982+00:00 app[web.1]:←[0m /usr/bin/env: ruby.exe: No
such file or directory
←[36m2013-08-25T20:18:43.430802+00:00 heroku[web.1]:←[0m Process exited with sta
tus 127
←[36m2013-08-25T20:18:43.443400+00:00 heroku[web.1]:←[0m State changed from star
ting to crashed
←[33m2013-08-25T20:19:48.199235+00:00 heroku[router]:←[0m at=error code=H10 desc
="App crashed" method=GET path=/favicon.ico host=radiant-lake-2999.herokuapp.com
fwd="82.28.231.27" dyno= connect= service= status=503 bytes=

在尝试了到目前为止我得到的所有建议并相应地完成了所有更改之后,这就是我在 heroku 日志中得到的:

←[36m2013-08-27T21:34:49.397195+00:00 app[web.1]:←[0m F, [2013-08-27T20:58:04.948189    #2] FATAL -- :
←[36m2013-08-27T21:34:49.397195+00:00 app[web.1]:←[0m ActionController::RoutingError (No route matches [GET] "/"):
←[36m2013-08-27T22:36:51.045269+00:00 app[web.1]:←[0m [2013-08-27 22:36:51] ERROR SignalException: SIGTERM
←[36m2013-08-27T22:36:51.045269+00:00 app[web.1]:←[0m /app/vendor/ruby- 1.9.3/lib/ruby/1.9.1/webrick/server.rb:98:in `select'
←[36m2013-08-27T22:37:01.918797+00:00 heroku[web.1]:←[0m Error R12 (Exit timeout) - >Atleastone process failed to exit within 10 seconds of SIGTERM
←[36m2013-08-27T22:37:01.918996+00:00 heroku[web.1]:←[0m Stopping remaining processes with SIGKILL

最佳答案

您需要在应用程序的第一行更改 3 个文件:
箱/捆
箱子/rails
仓/rake

改变

#!/usr/bin/env ruby.exe

#!/usr/bin/env ruby

那是错误!

你通常可以做的:

heroku run rake db:migrate

关于ruby-on-rails - 在 Heroku 上获取 "/usr/bin/env: ruby.exe: No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18433609/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com