heroku / heroku-buildpack-nginx

Run NGINX in a Heroku app
244 stars 787 forks source link

PATH to vendored Ruby is incorrect if buildpack dir differs from the default #107

Open r4victor opened 2 years ago

r4victor commented 2 years ago

After upgrading Heroku stack from 20 to 22, the nginx buildpack cannot compile nginx.conf.erb. It cannot find the erb executable.

The reason is that I use heroku-buildpack-subdir so that my runtime directory of nginx buildpack is /app/nginx. But this buildpack's compile script adds /app/.heroku-buildpack-nginx/ruby/bin to PATH, assuming that buildpack always lives in /app.

So heroku-buildpack-nginx doesn't work on Heroku stack 22 if you change the buildpack runtime directory from /app.

Now the solution could be to calculate the buildpack runtime directory from BUILD_DIR.