Error running RSpec in RubyMine - uninitialized constant Rake::DSL

Hi all,

I'm having a problem running RSpec tests in RubyMine. They are running fine in the console, but I'm getting this error when I run either "rake spec" or a RSpec run configuration in RubyMine (5.0). I am using JRuby 1.7.0 and rspec-core (2.13.0).

/Users/admin/.rvm/rubies/jruby-1.7.0/bin/jruby --1.9 -X+O -J-Djruby.reflection=true -J-Djruby.compile.mode=OFF -J-Djruby.debug.fullTrace=true -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/admin/.rvm/gems/jruby-1.7.0@project/gems/ruby-debug-ide-0.4.17.beta16/bin/rdebug-ide --port 50176 --dispatcher-port 50177 -- /Applications/RubyMine.app/rb/testing/runner/specs_in_folder_runner.rb --backtrace
Testing started at 7:53 PM ...
Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base 0.10.5.rc3) listens on 127.0.0.1:50176
/Users/admin/.rvm/rubies/jruby-1.7.0/bin/jruby --1.9 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/admin/.rvm/gems/jruby-1.7.0@project/bin/rspec _2.13.0_ --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter /Users/admin/Workspace/project/spec/api/authentication_spec.rb --backtrace
Searching files....
=========================================
1. /Users/admin/Workspace/project/spec/api/authentication_spec.rb:1




1 files were found.
=========================================
RSpec script : /Users/admin/.rvm/gems/jruby-1.7.0@project/bin/rspec


Spec Options:
["--backtrace"]
=========================================
Running specs...
Command line:
["/Users/admin/.rvm/rubies/jruby-1.7.0/bin/jruby", "--1.9", "-e", "$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)", "/Users/admin/.rvm/gems/jruby-1.7.0@project/bin/rspec", "_2.13.0_", "--require", "teamcity/spec/runner/formatter/teamcity/formatter", "--format", "Spec::Runner::Formatter::TeamcityFormatter", "/Users/admin/Workspace/project/spec/api/authentication_spec.rb", "--backtrace"]
/Users/admin/.rvm/gems/jruby-1.7.0@project/gems/ruby-debug-base-0.10.5.rc3-java/lib/ruby-debug-base.rb:211 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base 0.10.5.rc3) listens on 127.0.0.1:50184
NameError: uninitialized constant Rake::DSL



If I run 'rake spec' at the console, it runs fine (I'm using RVM and confirmed that rake is using JRuby).

Any help would be much appreciated..I'm completely stumped.
1 comment

Sorry for late response.  Could you please run rspec w/o debugger and provide the backtrace of the failure.

Regards, Oleg.

0

Please sign in to leave a comment.