1

我的 heroku 部署因以下错误而崩溃。

2012-12-12T17:16:18+00:00 app[web.1]: bash: bundle: command not found
2012-12-12T17:16:19+00:00 heroku[web.1]: Process exited with status 127
2012-12-12T17:16:19+00:00 heroku[web.1]: State changed from starting to crashed

此错误的 Heroku 文档是设置 PATH 和 GEM 变量,如https://devcenter.heroku.com/articles/changeing-ruby-version-breaks-path中所述,我试过了,但这也无济于事。

→ heroku config:add PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
→ heroku config:add GEM_PATH=vendor/bundle/ruby/1.9.1
→ heroku run rake db:migrate
Running rake db:migrate attached to terminal... up, run.7130
bash: bundle: command not found

接下来,我尝试在我的 Heroku 应用程序中设置 Ruby 版本。这增加了蛞蝓大小。但是应用程序仍然没有启动。

宝石文件

ruby "1.9.2"

推送到 Heroku

-----> Using Ruby version: ruby-1.9.2
-----> Installing dependencies using Bundler version 1.2.2

heroku 运行“ruby -v”

Running `ruby -v` attached to terminal... up, run.4483
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

有人可以请教

4

1 回答 1

0

该错误是因为您的路径不正确。

  1. 如果你尝试使用 Ruby 1.9.3,你不需要做任何事情,它是默认的 Ruby,所以你可以删除那些配置变量。
  2. 如果您使用的是 1.8.7 或 1.9.2,请升级到 1.9.3,因为它是最新的。
  3. If you're looking at using Ruby 2.0.0.p3 - you're on your own ;)
于 2012-12-12T22:12:02.460 回答