Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

ruby+php sequence in .buildpacks works; but php+ruby fails? #15

Closed
aceare opened this issue Jun 20, 2013 · 4 comments
Closed

ruby+php sequence in .buildpacks works; but php+ruby fails? #15

aceare opened this issue Jun 20, 2013 · 4 comments

Comments

@aceare
Copy link

aceare commented Jun 20, 2013

If .buildpacks contains:
https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/heroku/heroku-buildpack-php.git
then, git push heroku master succeeds.

However, .buildpacks contains:
https://github.com/heroku/heroku-buildpack-php.git
https://github.com/heroku/heroku-buildpack-ruby.git
then, "git push heroku master" fails with error "Push rejected, failed to compile Multipack app". Looks like "framework=$($dir/bin/detect $1)" fails for ruby.

Any clues/suggestions?

@leorochael
Copy link

Looks like, @michaelmior has the right of it.

Try the patch in pull request #12, and add your opinion to it.

Basically, the set -e instruction to the shell means that any command failures, even if intented to be captured in subshell commands, like $(...), causes the whole script to fail.

@aceare
Copy link
Author

aceare commented Jul 4, 2013

Thanks for the suggestion. But #12 patch didn't help to resolve this issue. Here are the details:
First item in .buildpacks, heroku-buildpack-php.git is compiled successfully. But then for heroku-buildpack-ruby.git, "$dir/bin/detect $1" retuns with $exit_code 1. So, "$dir/bin/compile $1 $2" is not executed and thus Ruby/Rails is not getting installed.
Also tried to forcefully execute "compile" for Ruby/Rails, but that also didn't help.

@j15e
Copy link

j15e commented Nov 21, 2013

The real issue here is that the default heroku PHP buildpack is moving everything to a new folder www so that is breaking the previous buildpack installation. If you place it before the ruby buildpack, it still move the Gemfile to www so the ruby buildpack detect phase is failling.

There is certainly good reasons to move stuff to www, but I don't like it and it makes other buildpack incompatible.

I made a quick fork to fix this issue, I hope it may resolve your issues as did for me in the same PHP + Ruby (for sass) setup :

https://github.com/hooktstudios/heroku-buildpack-php-multi

P.S. I think this issue should be closed as it is not caused by heroku-buildpack-multi.

@aceare
Copy link
Author

aceare commented Nov 21, 2013

Ooh yes, that explains it. Thanks 👍

@aceare aceare closed this as completed Nov 21, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants