-
Notifications
You must be signed in to change notification settings - Fork 39
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
Suggestion for handling Gemfile.lock on miq_bot #566
Conversation
Just wanted to throw this up for discussion, this is basically what I have to do every time I want to run some specs locally on this repo |
Interestingly the spec failure is new with rspec 3.10 (we were on 3.9) https://app.travis-ci.com/github/ManageIQ/miq_bot/builds/236027823#L540-L554 |
@agrare Did you not do |
@NickLaMuro I did use
We don't have any version limits on |
@agrare roger. Was just double checking since the OP just showed: adam@desktop:~/src/manageiq/miq_bot$ rspec |
Fixes `Cannot proxy frozen objects, rspec-mocks relies on proxies for method stubbing and expectations.`
Ah yeah good call, I'm usually too lazy to run through bundle exec (or even alias to |
I think you just need to |
@agrare So I wasn't able to reproduce the errors you had. I did a $ rspec
Traceback (most recent call last):
37: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `<main>'
36: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `load'
35: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/exe/rspec:4:in `<top (required)>'
34: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/runner.rb:45:in `invoke'
33: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/runner.rb:71:in `run'
...
3: from ~/.rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `each'
2: from ~/.rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `each'
1: from ~/.rubies/ruby-2.6.6/lib/ruby/2.6.0/bundler/runtime.rb:31:in `block in setup'
~/.rubies/ruby-2.6.6/lib/ruby/2.6.0/bundler/runtime.rb:319:in `check_for_activated_spec!': You have already activated rspec-support 3.9.4, but your Gemfile requires rspec-support 3.9.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
17: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `<main>'
16: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `load'
15: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/exe/rspec:4:in `<top (required)>'
...
3: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/configuration.rb:1568:in `block in requires='
2: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/configuration.rb:2105:in `load_file_handling_errors'
1: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/configuration.rb:2109:in `rescue in load_file_handling_errors'
~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/configuration.rb:2109:in `require': cannot load such file -- rspec/core/did_you_mean (LoadError)
18: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `<main>'
17: from ~/.gem/ruby/2.6.6/bin/rspec:23:in `load'
16: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/exe/rspec:4:in `<top (required)>'
...
3: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/formatters.rb:152:in `add'
2: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/formatters.rb:182:in `find_formatter'
1: from ~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/formatters.rb:212:in `built_in_formatter'
~/.gem/ruby/2.6.6/gems/rspec-core-3.9.3/lib/rspec/core/formatters.rb:212:in `require': cannot load such file -- rspec/core/formatters/progress_formatter (LoadError) This was somewhat expected as I had some newer versions of $ gem list | grep rspec
guard-rspec (4.7.3)
rspec (3.10.0, 3.9.0, 3.5.0)
rspec-core (3.10.1, 3.10.0, 3.9.3, 3.9.1, 3.5.4)
rspec-expectations (3.10.1, 3.10.0, 3.9.4, 3.9.3, 3.9.2, 3.9.0, 3.5.0)
rspec-mocks (3.10.2, 3.10.1, 3.10.0, 3.9.1, 3.5.0)
rspec-rails (5.0.1, 4.0.2, 4.0.1, 3.9.1, 3.9.0)
rspec-support (3.10.2, 3.10.1, 3.10.0, 3.9.4, 3.9.3, 3.9.2, 3.5.0)
rubocop-rspec (2.0.1)
spring-commands-rspec (1.0.4) Which I handled by doing a bit of bash hackery a few times. Example below: $ cat <<-EOF | xargs -I {} gem uninstal {} -Iv 3.10.2
rspec
rspec-core
rspec-expectations
rspec-mocks
rspec-support
EOF And then it ran just fine. So this leads me to believe it might be something odd with your setup (besides Linux v.s. OSX). As @bdunne suggested, possibly you have a different version of That said, I also think that doing a EDIT: Also tested on a fresh version of I had no issues with that either. |
Checked commits agrare/miq_bot@2d49f2d~...b5061a7 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint |
It was failing on travis also, not just locally: https://app.travis-ci.com/github/ManageIQ/miq_bot/builds/236027823#L542-L547 |
Since @bdunne wants to keep Gemfile.lock committed I'll close this and focus on getting some of the gems here updated since e.g. rspec 3.9 is going to be 2 years old soon |
When I clone this repo and try to run specs I get:
If I then
rm Gemfile.lock && bundle update
I pull down an invalid version ofcelluloid
which causes failures when runningrspec
:Looks like we require
~> 0.17.4