-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Running bundle install without cache invokes the wrong version #440
Comments
Lines 159 to 160 in ad718fa
I guess we could globally export BUNDLER_VERSION and do that logic earlier, just after installing Bundler. Interestingly it would probably also work when installing latest Bundler and with a Gemfile.lock BUNDLED WITH 1.x, due to Bundler auto-switching. But that wouldn't work for older Ruby versions, so probably not helpful for setup-ruby. Does it work if you use this? And if so, why not use that for the gem? - name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler: 1
bundler-cache: true |
I'll fix this, makes sense to move that code there and export it globally. |
The small advantage of only doing it previously for bundle config|lock was it was not necessary after because after the Gemfile.lock is enough to use the right Bundler version. |
That's exactly what I did in mongoid/mongoid-grid_fs#81 and it works well. I opened the issue because semantically |
AFAIK there is no such problem in practice with setup-ruby with many usages. Re bundler-install/bundler-cache, that's been designed on purpose. I wouldn't want |
The docs seem abundantly clear about this as well: https://github.com/ruby/setup-ruby#caching-bundle-install-automatically |
Thanks! Makes sense. |
I will revert this, it is causing more troubles (#444 (comment)) than it helps. Also it only fixes a very niche use-case of no bundler-cache, Ruby 2.7+ and Bundler 1 (EOL for a while). |
Thanks @eregon. |
Ensure the following before filing this issue
I verified it reproduces with the latest version with
- uses: ruby/setup-ruby@v1
(see Versioning policy)I tried to reproduce the issue locally by following the workflow steps (including all commands done by
ruby/setup-ruby
, except forDownloading Ruby
&Extracting Ruby
),and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)
Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
The workflow code or a link to the workflow file
Link to the log of a failed workflow job, or to a gist with the output
https://github.com/mongoid/mongoid-grid_fs/actions/runs/3851022104/jobs/6561793839
The command and output of the failing step
Any other notes?
When specifying a version of bundler without
bundler-cache
one must runbundle install
. With this setup that invokes another version of bundler.It's probably not a bug, or possibly a feature request.
install: true/false
that would do what bundler-cache: true does minus the cache (run bundle install).BUNDLE_GEMFILE
? Need to verify.The text was updated successfully, but these errors were encountered: