-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting BUNDLE_PATH is not a feature! #297
Comments
Looks like it was an upstream recommendation Lines 82 to 85 in 924602d
|
I don't see a call for it, and it really is painful. I don't expect anyone but me to set environment variables unless they are specifically required by the software in a container - and it just isn't.
which I would describe as a workaround. Everyone who sets BUNDLE_PATH in their .bundle/config file is going to see it break with this change. |
And even |
The $ docker run -it --rm -e BUNDLE_PATH= ruby env
PATH=/usr/local/bundle/bin:/usr/local/bundle/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=37ca18bf911d
TERM=xterm
BUNDLE_PATH=
RUBY_MAJOR=2.6
RUBY_VERSION=2.6.5
RUBY_DOWNLOAD_SHA256=d5d6da717fd48524596f9b78ac5a2eeb9691753da5c06923a6c31190abe01a62
GEM_HOME=/usr/local/bundle
BUNDLE_SILENCE_ROOT_WARNING=1
BUNDLE_APP_CONFIG=/usr/local/bundle
HOME=/root |
I have just realized that the real root of the poison is
What that is saying is that your app is located in /usr/local/bundle instead of '.'. It looks like that was done at the same time. Fortunately, I can set that correctly for my app and that should do the trick. But it seems like it was a horrible idea! |
That was done to facilitate a user that mounts their working directory into a ruby container so that they can live edit and not have to rebuild their image. This would either mask the installs done in the image via |
Ugh. I don't like it, but I can work around it. It would have been much nicer to do all the default config settings in ~/.bundle/config and leave environment variables out of it. Much easier to tweak files than env vars. |
Having the environment variable BUNDLE_PATH being set is a surprise. I didn't set it, and bundler uses the environment variable over the file configuration. Bundler has a default if it's not set.
I don't think the ruby container should set this environment variable.
The text was updated successfully, but these errors were encountered: