Skip to content

Commit

Permalink
(maint) Remove default bundler from rvm
Browse files Browse the repository at this point in the history
Use the workaround from
travis-ci/travis-ci#8717 (comment)
to remove the default bundler gemspec from RVM.

This fixes issues with the regression tests resolving to the incorrect
bundler, cauing this error with the 2.5.0 RVM:

  1) regression test with cookbook users should match expected output
     Failure/Error: command("git clone -q https://github.com/chef-cookbooks/#{name}.git .")

     Mixlib::ShellOut::ShellCommandFailed:
       Expected process to exit with [0], but received '1'
       ---- Begin output of bundle exec git clone -q https://github.com/chef-cookbooks/users.git . ----
       STDOUT:
       STDERR: /home/travis/.rvm/gems/ruby-2.5.0/bin/bundle:23:in `load': cannot load such file -- /home/travis/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle (LoadError)
       	from /home/travis/.rvm/gems/ruby-2.5.0/bin/bundle:23:in `<main>'
       	from /home/travis/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `eval'
       	from /home/travis/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `<main>'
       ---- End output of bundle exec git clone -q https://github.com/chef-cookbooks/users.git . ----
       Ran bundle exec git clone -q https://github.com/chef-cookbooks/users.git . returned 1
     # ./vendor/bundle/ruby/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:293:in `invalid!'
     # ./vendor/bundle/ruby/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:280:in `error!'
     # ./vendor/bundle/ruby/2.5.0/gems/rspec-command-1.0.3/lib/rspec_command.rb:111:in `block in command'
     # ./vendor/bundle/ruby/2.5.0/gems/rspec-command-1.0.3/lib/rspec_command.rb:108:in `tap'
     # ./vendor/bundle/ruby/2.5.0/gems/rspec-command-1.0.3/lib/rspec_command.rb:108:in `command'
     # ./spec/regression/regression_spec.rb:11:in `block (4 levels) in <top (required)>'
     # ./vendor/bundle/ruby/2.5.0/gems/rspec-command-1.0.3/lib/rspec_command.rb:47:in `block (2 levels) in <module:RSpecCommand>'
     # ./vendor/bundle/ruby/2.5.0/gems/rspec-command-1.0.3/lib/rspec_command.rb:45:in `block in <module:RSpecCommand>'
  • Loading branch information
richardc committed Mar 7, 2018
1 parent 19e4d21 commit 486491e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ branches:
before_install:
#- gem update --system
- gem --version
- find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete
- rvm @global do gem uninstall bundler -a -x -I || true
- gem install bundler
- bundle --version
Expand Down

0 comments on commit 486491e

Please sign in to comment.