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

bundler error when spring: true is combined with bundler v1.12 in Rails 4.2 environment #139

Closed
rmm5t opened this issue Jun 2, 2016 · 9 comments

Comments

@rmm5t
Copy link
Contributor

rmm5t commented Jun 2, 2016

Steps to reproduce:

  1. gem update --system
  2. gem install bundler --version "~> 1.12.5"
  3. Configure a Guardfile with guard :minitest, spring: true on a Rails 4.2 environment

Expected Behavior:

  • Test suite should run as expected, and use spring to run tests faster on each invocation

Actual Behavior:

require: cannot load such file -- bundler/setup

09:42:26 - INFO - Guard::Minitest 2.4.4 is running, with Minitest::Unit 5.9.0!
09:42:26 - INFO - Running: all tests
/Users/{user}/.rbenv/versions/2.2.5/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
    from /Users/{user}/.rbenv/versions/2.2.5/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/{user}/work/{myapp}/config/boot.rb:3:in `<top (required)>'
    from bin/rake:6:in `require_relative'
    from bin/rake:6:in `<main>'

Known Workaround Option 1: (downgrade bundler)

  1. gem uninstall -Ix bundler
  2. gem install bundler --version "~> 1.11.2"

Known Workaround Option 2: (turn off spring, resulting in slower tests)

  • Remove spring: true from Guardfile
@rmm5t
Copy link
Contributor Author

rmm5t commented Jun 2, 2016

Update: I suspect this might be related to rubygems/bundler#4602

@e2
Copy link
Contributor

e2 commented Jun 2, 2016

I'm guessing it's because of this line:

https://github.com/guard/guard-minitest/blob/2db91fb/lib/guard/minitest/runner.rb#L135

Here's a fix: guard/guard-rspec#378

See this issue: guard/guard-rspec#369

@e2
Copy link
Contributor

e2 commented Jun 2, 2016

If you can prepare a PR based on the fix above, I can make a quick bugfix release.

I believe with_clean_env has been replaceable since forever, so I believe the config option can be skipped. (I haven't researched the differences much).

@rmm5t
Copy link
Contributor Author

rmm5t commented Jun 2, 2016

Thanks @e2. Good pointer. I'll prepare a PR as soon as I can get to it.

@rmm5t
Copy link
Contributor Author

rmm5t commented Jun 5, 2016

@e2 PR submitted at #140. Skipped the extra config option. Thanks!

@e2
Copy link
Contributor

e2 commented Jun 5, 2016

FYI, I think bugs like this can now be reproduced with gem_isolator, like I used for guard_rspec:

guard/guard-rspec@f565af6

I'll merge the PR without it, but from experience I know it's helpful to reproduce LOAD_PATH and bundler issues which Guard::Minitest is especially prone to.

Thanks again!

@e2 e2 closed this as completed in #140 Jun 5, 2016
@e2
Copy link
Contributor

e2 commented Jun 5, 2016

Released (v2.4.5). Let me know if there's anything else ;)

@rmm5t
Copy link
Contributor Author

rmm5t commented Jun 5, 2016

@e2 Thanks for super-fast turnaround.

@e2
Copy link
Contributor

e2 commented Jun 5, 2016

My pleasure :)

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