Ruby buildpack and passenger

Hello,

I’m trying to port over an app that uses passenger and I get:

2021-05-06T21:01:58Z [info] nginx: [alert] Unable to start Phusion Passenger(R): Support binary PassengerAgent not found (tried: /layers/heroku_ruby/gems/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.8/buildout/support-binaries/PassengerAgent and /app/.passenger/support-binaries/6.0.8/PassengerAgent). There may be different causes for this:
2021-05-06T21:01:58Z [info]  - Your 'passenger_root' setting is set to the wrong value. Please see https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_root to learn how to fix the value.
2021-05-06T21:01:58Z [info]  - The PassengerAgent binary is not compiled. Please run this command to compile it: /layers/heroku_ruby/gems/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.8/bin/passenger-config compile-agent
2021-05-06T21:01:58Z [info]  - Your Passenger installation is broken or incomplete. Please reinstall Passenger. (-1: Unknown error)
2021-05-06T21:01:58Z [info] Main child exited normally with code: 1
2021-05-06T21:01:58Z [info] Starting clean up.
***v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1

Anyone managed to get this working, or should I look to switch web servers?

How are you installing Passenger? Is it in your Gemfile? And what command does it need to run to start your app?

(I have no direct experience but might be able to figure out what’s up anyway)

Hi Kurt, yes it was via a gem file, but I’ve switched it out, now battling trying to get FreeImage installed, hoping I can chain buildpacks :slight_smile:

My recommendation here would be to switch to Docker. It takes a bit of effort, but gives you a lot more control over the execution environment, build cache behavior, etc. If you need help, let me know! I love making Ruby Dockerfiles :smiley:

1 Like

If you can, a Dockerfile is usually better because it can be perfect fit for your app.

You can chain buildpacks like:

[build]
builder = "heroku/buildpacks:20"
buildpacks = ["buildpack1", "buildpack2", "etc"]

(Documented here: App Configuration (fly.toml) · Fly)

Thanks all, looks like Docker will need to be the way as this app is quite old and has a few dependencies.