heroku:bash:bundle:找不到命令 [英] heroku: bash: bundle: command not found

查看:916
本文介绍了heroku:bash:bundle:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在进行最后的部署步骤。我得到这个错误:

  2012-10-22T11:23:53 + 00:00 heroku [web.1]:开始进程使用命令`bundle exec thin start -p 40310 -e production` 
2012-10-22T11:23:54 + 00:00 app [web.1]:bash:bundle:command not found

我不明白我可以如何负责告诉Heroku堆栈在哪里,或者提供它,因为bundler被它用来完成这项工作。该命令在应用程序的Procfile中指定:

  web:bundle exec瘦启动-p $ PORT -e $ RACK_ENV 

另一个关于stackoverflow的类似问题表明,如果应用程序最初没有Procfile被推送到Heroku,就会发生这种情况Heroku对于它是什么样的应用程序有错误的想法。该海报删除了他的应用程序并创建了一个新的应用程序并报告成功但是,删除和重新创建我的移植应用程序的努力很高。有没有什么方法可以解决这个问题,而不是从头开始?

解决方案

Heroku的slu build构建过程必须在ruby 1.8 .7应用程序。我猜测他们开始捆绑到1.8路径而不是1.8.1应用程序的1.9.1。我之前工作的应用程序停止工作后,我试图推新修订。



这是什么让它再次工作:

  heroku config:add PATH = bin:vendor / bundle / 1.8 / bin:/ usr / local / bin:/ usr / bin:/ bin GEM_PATH = vendor / bundle / 1.8 

我使用与之前使用的相同git存储库从新创建的应用程序中获取这些路径。



编辑:原来,这个heroku发表了一篇devcenter文章更改Ruby版本中断路径,指定各种ruby版本的路径。


I am porting a Heroku app from Aspen to Cedar stack at Heroku, following their instructions.

I'm at the last deploy step. I get this error:

    2012-10-22T11:23:53+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 40310 -e production`
2012-10-22T11:23:54+00:00 app[web.1]: bash: bundle: command not found

I can't see how I can be responsible for telling the Heroku stack where bundle is, or providing it, since bundler is used by it for exactly this job. This command is specified in the Procfile for the app:

web: bundle exec thin start -p $PORT -e $RACK_ENV

Another similar question on stackoverflow suggests that this happens if the app is pushed to Heroku without a Procfile initially, so Heroku gets the wrong idea about what kind of app it is. That poster deleted his app and created a new one and reported success. However, the effort involved in deleting and recreating my ported app is high. Is there some way I can fix this rather than start over?

解决方案

Heroku's slug build process must have changed with regard to ruby 1.8.7 apps. I'm guessing they started bundling to 1.8 paths instead of 1.9.1 for 1.8 apps. My previously working app stopped working after I tried to push a new revision.

Here's what got it working again:

heroku config:add PATH=bin:vendor/bundle/1.8/bin:/usr/local/bin:/usr/bin:/bin GEM_PATH=vendor/bundle/1.8

I took these paths from a newly created app using the same git repository as I used before.

EDIT: Turns out that heroku published a devcenter article Changing Ruby Version Breaks Path that specifies paths for various ruby versions.

这篇关于heroku:bash:bundle:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆