burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

zeus v0.15.10: undefined method `invoke' for RSpec::Core::Runner::Class #588

Closed daliborfilus closed 7 years ago

daliborfilus commented 8 years ago

Just installed new zeus from rubygems and ran into this issue:

$ zeus rspec spec/
/Users/noice/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/zeus-0.15.10/lib/zeus/rails.rb:207:in `test': undefined method `invoke' for RSpec::Core::Runner:Class (NoMethodError)
        from /Users/noice/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/zeus-0.15.10/lib/zeus.rb:147:in `block in command'
        from /Users/noice/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/zeus-0.15.10/lib/zeus.rb:134:in `fork'
        from /Users/noice/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/zeus-0.15.10/lib/zeus.rb:134:in `command'
        from /Users/noice/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/zeus-0.15.10/lib/zeus.rb:50:in `go'
        from -e:1:in `<main>'

Zeus itself starts just fine.

ruby 2.0.0p598
$ bundle list|egrep "\* (rails|rake)"
  * rails (4.0.10)
  * rails-observers (0.1.2)
  * rake (10.4.2)
$ bundle list|grep rspec
  * guard-rspec (4.2.0)
  * rspec (2.14.1)
  * rspec-core (2.14.7)
  * rspec-expectations (2.14.4)
  * rspec-mocks (2.14.4)
  * rspec-rails (2.14.0)

Downgraded to my previously installed zeus 0.15.4 and that still works correctly.

chip commented 8 years ago

I had a similar issue, but was running different versions:

$ rbenv local
2.2.5
 ...Macintosh HD 2/code/art-steps   master ✘ ✹ ✚ 
$ bundle list|egrep "\* (rails|rake)"
  * rails (3.2.13)
  * rails_12factor (0.0.3)
  * rails_serve_static_assets (0.0.5)
  * rails_stdout_logging (0.0.5)
  * rake (11.2.2)
 ...Macintosh HD 2/code/art-steps   master ✘ ✹ ✚ 
$ bundle list|grep rspec             
  * guard-rspec (4.7.3)
  * rspec (2.99.0)
  * rspec-collection_matchers (1.1.2)
  * rspec-core (2.99.2)
  * rspec-expectations (2.99.2)
  * rspec-mocks (2.99.4)
  * rspec-rails (2.99.0)
 ...Macintosh HD 2/code/art-steps   master ✘ ✹ ✚ 
$ zeus --version        
Zeus version 0.15.3

Downgrading to 0.15.3 worked for me.

pavel-d commented 8 years ago

+1

metcalf commented 7 years ago

@latortuga: It looks like this was a result of your change https://github.com/burke/zeus/pull/514/commits/954894af8c1d69af958860ea7f2bd2333283b91f in https://github.com/burke/zeus/pull/514. Can you investigate?

latortuga commented 7 years ago

sigh yeah it probably is from that change. It really cleaned some things up. I wonder, if we were to add require 'rspec/autorun' like the minitest version, would that clean it up? hmm....

bingxie commented 7 years ago

+1

ianforsyth commented 7 years ago

+1

thuanbuitinypulse commented 7 years ago

+1

tw5475 commented 7 years ago

+3

richkettle commented 7 years ago

+1

alexpinsky commented 7 years ago

+1

excalq commented 7 years ago

Any update on this? I'm seeing it with zeus-0.15.10 running Rspec 2.14.8, with a Rails 3.2 app, running Ruby 2.1.5 (rbenv).

dmahlow commented 7 years ago

It looks like the 'invoke' class method called in https://github.com/burke/zeus/pull/514/commits/954894af8c1d69af958860ea7f2bd2333283b91f is only available in rspec from version 3.0.0 forward: https://github.com/rspec/rspec-core/commit/0728973744e6463dd9701e0dfd2627f3c37d8367

So if you don't want to downgrade zeus, you can also try to upgrade rspec to ~> 3.0.0

dmahlow commented 7 years ago

This still seems to be an issue with 0.15.12.

sideshowcoder commented 7 years ago

So I guess the way to fix this is to check the RSpec version first and then do the right thing according to https://github.com/burke/zeus/pull/514/commits/954894af8c1d69af958860ea7f2bd2333283b91f

sideshowcoder commented 7 years ago

Should be fixed now :)

dmahlow commented 7 years ago

Confirmed working in 0.15.13.pre. Thanks!