Thank you for reporting this and for sharing that link to the bundler issue. I’ve reproduced this and confirmed it’s a problem with bundler 1.16.0 and issue 6144.
To summarize for others, that issue affects
bundle install --deployment and
bundle install --path <anything>. We typically suggest
--path vendor/bundle, but as long as this flag is used, bundler will follow a bad code path. This also only seems to affect certain programs and packages, ones that launch another Ruby process requiring the Bundler environment. I’ve seen this affect
rake test and
rails test because of the Spring loader, and
A workaround is to install bundler 1.15.4 with:
sudo gem uninstall -x bundler
sudo gem install bundler --version 1.15.4
This will let you keep using
--path vendor/bundle for caching.
As for our convenience image, I’ll create an issue with the community Ruby image to see if I can get it fixed there. We can patch this in our Ruby convenience images, but I’d prefer to keep ours as close to the community images as possible.