Heroku:部署ruby app后,"进程退出状态为127"

Art*_*uro 4 ruby rake ruby-on-rails heroku

在对Heroku部署一些更改后,我收到以下错误(即使我还原了更改).

» heroku web.1 - - Starting process with command `bin/rails server -p 59617 -e production`
» app web.1 - - /usr/bin/env: ruby : No such file or directory
» heroku web.1 - - Process exited with status 127
» heroku web.1 - - State changed from starting to crashed
Run Code Online (Sandbox Code Playgroud)

似乎我的应用程序不再理解ruby了.这些是我在/ bin中的文件:

#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
Run Code Online (Sandbox Code Playgroud)

轨道

#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application',  __FILE__)
require_relative '../config/boot'
require 'rails/commands'
Run Code Online (Sandbox Code Playgroud)

#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
Run Code Online (Sandbox Code Playgroud)

heroku运行"gem env"

heroku运行

Art*_*uro 6

几个小时后尝试不同的解决方案,这是唯一对我有用的东西:

rake rails:update:bin
Run Code Online (Sandbox Code Playgroud)

并将更改再次推送到Heroku.

  • 您是否有针对Django应用的解决方案? (2认同)