I'm working in a phusion/passenger-ruby24
Docker image with my Rails application.
My application is in /<company>/app
and my gems are in /<company>/app_dependencies
.
When I execute bundle exec passenger start
, the gems cannot be found (expected). However, when I set BUNDLE_PATH
in the environment to /<company>/app_dependencies>
, it doesn't get propagated to the application environment. I can verify this by running bundle exec 'echo $BUNDLE_PATH'
.
I've been able to bypass this problem by creating a /<company>/app/.bundle/config
and setting the BUNDLE_PATH
there. Although it works, it isn't optimal.
I've tried forcing the variable into the app environment like so:
BUNDLE_PATH=/<company>/app_dependencies bundle exec passenger start
and
bundle exec passenger start --envvar BUNDLE_PATH=/<company>/app_dependencies
without any luck.
Oddly enough, other environment variables get passed though without a problem It's BUNDLE_PATH
that gets unset. I'm not sure what else to try and although I have some workarounds, I'd like to be able to set the env var which is the more correct way.
Thanks.