I have a Rails app set up with Passenger + Nginx.
When trying to access the app I get the following error in passenger’s logs:
/home/my_user/.rbenv/versions/3.3.1/bin/ruby: No such file or directory -- Passenger AppPreloader: /home/my_user/domains/my_domain/app/current (LoadError)
However the file /home/my_user/.rbenv/versions/3.3.1/bin/ruby
and the directory /home/my_user/domains/my_domain/app/current
both exist…
I have tried many things but I’m not even sure how to investigate the issue… any suggestions?
2
Answers
This is an issue with the Passenger Docker.
Issue has been raised for the bug: https://github.com/phusion/passenger-docker/issues/409
As a quick fix which worked for me, you can add below line in your Dockerfile:
After upgrading Alma Linux kernel to 4.18.0-553.8.1.el8_10.x86_64 and deploying an updated Rails 7.1 app, passenger started to return the same No Such File or Directory error. Disabling passenger’s smart spawning error made the problem go away.
Using passenger 6.0.23