Skip to content
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

Travis builds are failing due to a weird interaction with gem resolution by Bundler #492

Closed
mvz opened this issue Sep 7, 2017 · 7 comments

Comments

@mvz
Copy link
Contributor

mvz commented Sep 7, 2017

Summary

I thought @maxmeyer and I fixed the builds but now they're failing because of a version conflict for did_you_mean.

Expected Behavior

Bundler activates did_you_mean version 1.0.3 and proceeds to run the tests.

Current Behavior

bin/test fails with the following error (from https://travis-ci.org/cucumber/aruba/jobs/272342270):

$ bin/test
bundler: failed to load command: rake (/home/travis/build/cucumber/aruba/vendor/bundle/ruby/2.3.0/bin/rake)
Gem::LoadError: You have already activated did_you_mean 1.0.0, but your Gemfile requires did_you_mean 1.0.3. Prepending `bundle exec` to your command may solve this.
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler/runtime.rb:317:in `check_for_activated_spec!'
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler/runtime.rb:32:in `block in setup'
  /home/travis/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/forwardable.rb:204:in `each'
  /home/travis/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/forwardable.rb:204:in `each'
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler/runtime.rb:27:in `map'
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler/runtime.rb:27:in `setup'
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
  /home/travis/.rvm/gems/ruby-2.3.4/gems/bundler-1.15.4/lib/bundler/setup.rb:19:in `<top (required)>'
  /home/travis/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /home/travis/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

What I think happens is this:

Globally installed bundler requires globally installed did_you_mean version 1.0.0, then tries to activate bundled did_you_mean version 1.0.3, resulting in a conflict.

Possible Solution

One option is to not install to vendor/bundle, so bundler will find the new did_you_mean when it loads. There may be reasons why we install to vendor/bundle however.

Input from a Bundler expert could be useful too.

Context & Motivation

The build should be green so we can judge PRs based on that.

Your Environment

Travis :-).

@mvz
Copy link
Contributor Author

mvz commented Sep 7, 2017

I'm going to see what happens if we first do 'gem update bundler'.

@mvz
Copy link
Contributor Author

mvz commented Sep 7, 2017

I'm going to see what happens if we first do 'gem update bundler'.

Nope, that's not going to work, the latest bundler is already installed by bin/bootstrap.

It seems the problem was triggered by the addition of yard-junk in #491, which has a direct dependency on did_you_mean. I'll try moving it out of the :test group, since we're not running this task on Travis CI yet.

@olleolleolle
Copy link
Contributor

(Apologies, apologies.) I will carry this side-effect note to the yard-junk repository's Issue tracker.

@mvz
Copy link
Contributor Author

mvz commented Sep 7, 2017

No problem 🙂.

@olleolleolle
Copy link
Contributor

@mvz zverok/yard-junk#21 (comment) look, a new release which tries to support more Ruby versions. Perhaps this is easier to use in CI, now?

@mvz
Copy link
Contributor Author

mvz commented Sep 7, 2017

@olleolleolle oh, nice!

@mvz
Copy link
Contributor Author

mvz commented Sep 8, 2017

This issue has been fixed in #493.

@mvz mvz closed this as completed Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants