Heroku-Buildpack-Multi导致应用崩溃 [英] Heroku-Buildpack-Multi causing app to crash

查看:185
本文介绍了Heroku-Buildpack-Multi导致应用崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上有一个Rails 4应用程序,我试图用两个buildpack来部署。我不确定是否错过了一个步骤,或者是否存在错误,但是当我推送代码时,应用程序成功部署。但是,当我打开它时,它会崩溃。



我试过使用命令 heroku buildpacks:set https://github.com/bobbus/image-optim-buildpack.git heroku buildpacks:设置https://github.com/ddollar/heroku-buildpack-multi.git ,但我只能设置一个一次,不是两次。我设置哪一个似乎并不重要,应用程序总是崩溃。通过搜索日志,我看到以下内容:

  heroku [web.1]:状态从崩溃状态变为开始
heroku [web.1]:用命令`bundle exec puma -t 5:5启动进程 - p $ {PORT:-3000} -e $ {RACK_ENV:-development}`
app [web.1] :bash:bundle:找不到命令
heroku [web.1]:进程已退出,状态为127
heroku [web.1]:状态从开始更改为崩溃

我不是 bundler 的专家,但它似乎是因为某种原因,它不是在我的Procfile中识别bundle命令。



这里是我的Procfile,我应该注意的是它一直工作到现在。

  web:bundle exec puma -t 5:5 -p $ {PORT:-3000} -e $ {RACK_ENV:-development} 

我也尝试清理构建包( heroku buildpacks:clear )并创建一个 .buildpacks 文件,但是会产生同样的错误。



这里是我的 .builcpacks 文件:

  https://github.com /ddollar/heroku-buildpack-multi.git 
https://github.com/bobbus/image-optim-buildpack.git



解决方案在Heroku开发中心和构建包本身的文档本身相当稀少。如果您列出的两个构建包是您加载的唯一两个构建包,我认为您错过了Ruby构建包,这是捆绑程序的定义:

  https://github.com/heroku/heroku-buildpack-ruby 


$ b 注意:如果我正在调试这个,我会抛弃buildpack-multi,只使用Ruby buildpack来查看是​​否可以通过捆绑器获取错误,然后尝试加载另一个buildpack,等等。






我明白你对文档的意思。很弱。让我知道这是否有帮助。


I'm have a Rails 4 app on Heroku that I'm trying to deploy with two buildpacks. I'm not sure if I'm missing a step or if there is a bug, but when I push the code, the app deploys successfully. When I open it however, it crashes.

I've tried using the command heroku buildpacks:set https://github.com/bobbus/image-optim-buildpack.git and heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git, but am only able to set one at a time, not both. It doesn't seem to matter which one I set, the app always crashes. Searching through the logs, I see the following:

heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}`
app[web.1]: bash: bundle: command not found
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed

I'm no expert on bundler, but it seems like for some reason it's not recognizing the bundle command in my Procfile.

Here is my Procfile, which I should note has worked perfectly up until now.

web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}

I've also tried clearing out the buildpacks (heroku buildpacks:clear) and creating a .buildpacks file instead, but that yielded the same error.

Here is my .builcpacks file:

https://github.com/ddollar/heroku-buildpack-multi.git
https://github.com/bobbus/image-optim-buildpack.git

The documentation in the Heroku Dev Center and on the buildpacks themselves is pretty sparse as far as I can tell.

解决方案

If the two build packs you listed are the only two you're loading, I think you're missing the Ruby buildpack, which is where the "bundler" is defined:

https://github.com/heroku/heroku-buildpack-ruby

Note: If I were debugging this, I would ditch the buildpack-multi, and use just the Ruby buildpack to see if you can get that through the bundler error, then try to load another buildpack, and so on.


I see what you mean about the documentation. Pretty weak. Let me know if this helps.

这篇关于Heroku-Buildpack-Multi导致应用崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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