-
-
Notifications
You must be signed in to change notification settings - Fork 342
Description
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:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: false
- name: Install bundle manually
run: |
bundle config --local path vendor/bundle
bundle config --local deployment true
bundle install --jobs 4
- name: Rubocop
run: bundle exec rubocop
This works, so it seems somehow the bundle
command isn't in a working state for the built-in exec
s - could it be executing the wrong bin
stub maybe?
The reported image is:
Operating System
Ubuntu
18.04.5
LTS
Virtual Environment
Environment: ubuntu-18.04
Version: 20201129.1
The full output from one of the failing job (our rspec job does the same):
Downloading Ruby
https://github.com/ruby/ruby-builder/releases/download/toolcache/ruby-2.5.1-ubuntu-18.04.tar.gz
Took 0.46 seconds
Extracting Ruby
/bin/tar -xz -C /opt/hostedtoolcache/Ruby/2.5.1 -f /home/runner/work/_temp/***********
Took 0.32 seconds
Installing Bundler
Using Bundler 2 from Gemfile.lock BUNDLED WITH 2.1.4
/opt/hostedtoolcache/Ruby/2.5.1/x64/bin/gem install bundler -v ~> 2 --no-document
Successfully installed bundler-2.1.4
1 gem installed
Took 0.56 seconds
bundle install
/opt/hostedtoolcache/Ruby/2.5.1/x64/bin/bundle config --local path vendor/bundle
/opt/hostedtoolcache/Ruby/2.5.1/x64/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
from /opt/hostedtoolcache/Ruby/2.5.1/x64/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
from /opt/hostedtoolcache/Ruby/2.5.1/x64/bin/bundle:23:in `<main>'
Took 0.07 seconds