You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bundle installation fails with Ruby 2.5.1 and Bundler 2.1.4 #122
I've hit a strange issue while using this action. We're using mostly default options, with bundler-cache: true on an Ubuntu 18.04 image. We use .ruby-version and Gemfile.lock and I can see from log output that the action picks up ruby 2.5.1 and bundler 2.1.4 correctly.
It successfully installs bundler 2.1.4 but the first bundle config command fails with Can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException). This worked in July when I this was last touched. The full log output is at the end of the message.
After some wrangling, I found that I could work around this by turning off the cache and instead appending the bundle commands manually in my actions file:
Thanks for the quick reply; I don't have a straightforward Gemfile as such (the action I hit this on is for an internal gem so it's using a gemspec) - however I have tested the action against the ojab/setup-ruby@master which is the source for #120 and I can verify that does fix it for me.
Hopefully that is enough information to consider this fixed in #120, but if not let me know and I'll see what I can do.
Activity
eregon commentedon Dec 9, 2020
Thanks for the report.
This error message sounds like some bug in the RubyGems shipped with Ruby 2.5.
It is probably due to #120
So I think I'll try setting
BUNDLER_VERSIONonly if needed (ifbundler: 1and Ruby >= 2.7).Do you have a Gemfile I could try to reproduce with and check that solves it?
njm506 commentedon Dec 9, 2020
Thanks for the quick reply; I don't have a straightforward Gemfile as such (the action I hit this on is for an internal gem so it's using a gemspec) - however I have tested the action against the
ojab/setup-ruby@masterwhich is the source for #120 and I can verify that does fix it for me.Hopefully that is enough information to consider this fixed in #120, but if not let me know and I'll see what I can do.
eregon commentedon Dec 9, 2020
Ah, so it might be already fixed?
Could you try a new run with
ruby/setup-ruby@v1?And could you also try
ruby/setup-ruby@bundler-version-when-neededwhich only setsBUNDLER_VERSIONwhen needed? It's probably safer anyway.njm506 commentedon Dec 9, 2020
I can confirm that (as of just now),
ruby/setup-ruby@v1still fails as before, and thatruby/setup-ruby@bundler-version-when-neededpasses :)eregon commentedon Dec 9, 2020
Released as https://github.com/ruby/setup-ruby/releases/tag/v1.58.1, so
ruby/setup-ruby@v1should work fine now.