Cannot run/debug specs with RubyMine 6
Most of my specs doesn't work in RubyMine 6. When I run a single spec from the context menu in the project tree I get the following error:
runtime.rb:33:in `block in setup': You have already activated multi_json 1.8.2, but your Gemfile requires multi_json 1.7.7. Using bundle exec may solve this. (Gem::LoadError)
Process finished with exit code 1
Empty test suite.
I can however run them with rspec in the terminal, and I can also run them in RubyMine 5.4. Is this possibly bug in RubyMine 6? (I couldn't find anything under known issues)
Rails 4
Ruby 2.0.0
Mac OSX Mountain Lion
RubyMine 6
请先登录再写评论。
How do you run specs in RubyMine (single spec script, all specs in directories, or rake spec)?
Regards, Oleg.
I run a single spec script by right clicking it and choose to debug (or run) the spec. Also edited my post to cover this.
Could you please try run the test in RM in bundler context (need to edit the run configuration by checking the only checkbox we have on Bundler tab)
Also could you please provide the command you use to run the spec in command line.
Thanks in advance, Oleg.
With bundler checked
/Users/r/.rvm/rubies/ruby-2.0.0-head/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/r/.rvm/gems/ruby-2.0.0-head/gems/ruby-debug-ide-0.4.22/bin/rdebug-ide --disable-int-handler --port 53138 --dispatcher-port 53139 -- /Users/r/.rvm/gems/ruby-2.0.0-head/bin/rspec /Users/r/Sites/m/spec/controllers/my_example_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 14:33
...
Process finished with exit code 1
Empty test suite.
Without checking bundler
/Users/r/.rvm/rubies/ruby-2.0.0-head/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/r/.rvm/gems/ruby-2.0.0-head/gems/ruby-debug-ide-0.4.22/bin/rdebug-ide --disable-int-handler --port 53150 --dispatcher-port 53151 -- /Users/r/.rvm/gems/ruby-2.0.0-head/bin/rspec /Users/r/Sites/m/spec/controllers/my_example_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 14:35
...
Process finished with exit code 1
Empty test suite.
When running in terminal
$ rspec spec/controllers/my_example_spec.rb
...
Finished in 0.00438 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/controllers/my_example_spec.rb:5 # My behaviour should do something
Randomized with seed 56307
Coverage report generated for RSpec to /Users/r/Sites/m/coverage. 206 / 227 LOC (90.75%) covered.
When debugging single spec in RM 5.4 (without bundle exec)
/Users/r/.rvm/rubies/ruby-2.0.0-head/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/r/.rvm/gems/ruby-2.0.0-head/gems/ruby-debug-ide-0.4.22/bin/rdebug-ide --port 53252 --dispatcher-port 53253 -- /Users/r/.rvm/gems/ruby-2.0.0-head/bin/rspec /Users/r/Sites/m/spec/controllers/my_example_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 14:46 ...
Fast Debugger (ruby-debug-ide 0.4.22, debase 0.0.8) listens on 127.0.0.1:53252
expected: false
got: true (using ==)
./spec/controllers/my_example_spec.rb:7:in `block (2 levels) in <top (required)>'
1 example, 1 failure, 0 passed
Finished in 0.007473 seconds
Coverage report generated for RSpec to /Users/r/Sites/m/coverage. 206 / 227 LOC (90.75%) covered.
Process finished with exit code 1
Also, after I successfully ran the spec in RM 5.4 it magically works in RM 6. So basically I have to run once in 5.4 to be able to run them in 6. I'm confused, to say the least...