Error when running rake test

Hello all,
Using Rubymine 3 and rails 3, I get the following stack when I try to run the rake test command:

Can someone please help?

This stack is if I use test-unit v1.2.3 (which I read somewhere was the correct version to use?)


C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/bin/rdebug-ide --port 62861 -- C:\Ruby192\bin/rake test
Testing started at 12:51 PM ...
Fast Debugger (ruby-debug-ide 0.4.15, ruby-debug-base 0.11.25.jb2) listens on 127.0.0.1:62861
(in C:/Repository/blog)
1 tests, 1 assertions, 0 failures, 0 errors
Test suite finished: 0.161 seconds
Errors running test:units!
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:84:in `abort'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:84:in `block in <top (required)>'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
 C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
 C:/Ruby192/bin/rake:19:in `load'
 C:/Ruby192/bin/rake:19:in `<top (required)>'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/lib/ruby-debug-ide.rb:112:in `debug_load'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/lib/ruby-debug-ide.rb:112:in `debug_program'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/bin/rdebug-ide:87:in `<top (required)>'
 -e:1:in `load'
 -e:1:in `<main>'
Uncaught exception: Errors running test:units!

Process finished with exit code 1


If I use test-unit v2.1.2 I get this stack:

C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/bin/rdebug-ide --port 62992 -- C:\Ruby192\bin/rake test
Testing started at 12:57 PM ...
Fast Debugger (ruby-debug-ide 0.4.15, ruby-debug-base 0.11.25.jb2) listens on 127.0.0.1:62992
(in C:/Repository/blog)
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': no such file to load -- test/unit/color-scheme (LoadError)
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/test-unit-2.1.2/lib/test/unit/autorunner.rb:1:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Program Files/JetBrains/RubyMine 3.0/rb/testing/patch/testunit/test/unit/autorunner.rb:24:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/test-unit-1.2.3/lib/test/unit.rb:2:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/test_help.rb:5:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
 from C:/Repository/blog/test/test_helper.rb:3:in `<top (required)>'
 from test/functional/blog_controller_test.rb:1:in `require'
 from test/functional/blog_controller_test.rb:1:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `block in <main>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `<main>'
Errors running test:units, test:functionals!
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:84:in `abort'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:84:in `block in <top (required)>'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
 C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
 C:/Ruby192/bin/rake:19:in `load'
 C:/Ruby192/bin/rake:19:in `<top (required)>'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/lib/ruby-debug-ide.rb:112:in `debug_load'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/lib/ruby-debug-ide.rb:112:in `debug_program'
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.15/bin/rdebug-ide:87:in `<top (required)>'
 -e:1:in `load'
 -e:1:in `<main>'
Uncaught exception: Errors running test:units, test:functionals!
Empty test suite.

Process finished with exit code 1
2 comments
Comment actions Permalink

Set up the same test on a ubuntu box and had no problems.  

0
Comment actions Permalink

I had more or less the same problem. If you view the file with the <top complaint, check if there is a tiny red mark at the end of the file as viewed in the editor. This seems to mean that there is a more or less undetected syntax error in the file.  In my routes.rb file, I had a line:

   match :controller=>"admin", :action=>"login"

When I changed this line to:

  match ':controller=>"admin", :action=>"login" '

Then the <top error went away and I can progress.

(Note that either of the match lines may be in error - still debugging here)

0

Please sign in to leave a comment.