Heroku:bash:bundle:找不到命令

时间:2012-12-12 18:10:23

标签: heroku ruby-on-rails-3.2 ruby-1.9.2 cedar

我的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/changing-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版本。这增加了sluizeize。但应用程序仍未启动。

Gemfile

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]

有人可以提供建议吗

1 个答案:

答案 0 :(得分:0)

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

  1. 如果您正在尝试使用Ruby 1.9.3,则无需执行任何操作, 它是默认的Ruby,因此您可以删除这些配置变量。
  2. 如果您正在使用 1.8.7或1.9.2,然后升级到1.9.3,因为它是当前的。
  3. 如果您正在使用Ruby 2.0.0.p3 - 您可以自己使用;)
相关问题