测试从命令行运行,但不在 RubyMine 中运行 - 未找到测试

发布于 2024-09-29 09:07:32 字数 10956 浏览 4 评论 0原文

我正在尝试使用 RubyMine 在现有项目中运行测试。不幸的是,每当我尝试这样做时,我都会收到消息未找到测试,并且测试控制台输出的底部我会看到消息:

Errors running test:units and test:functionals!
Empty test suite.

Process finished with exit code 1

我已尝试使用或不使用命令运行测试
-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) 但没有调整除此之外的默认测试配置。以下是当前配置作为参考:

RubyMine 运行/调试配置

RubyMine 内测试控制台的完整转储:

C:\Ruby187\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby187\bin/rake test
Testing started at 1:41 PM ...
(in C:/CodeMetrics/2nd/cmusv)
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/course_number_test.rb" "test/unit/course_test.rb" "test/unit/curriculum_comment_test.rb" "test/unit/curriculum_comment_type_test.rb" "test/unit/effort_log_line_item_test.rb" "test/unit/effort_log_mailer_test.rb" "test/unit/effort_log_template_test.rb" "test/unit/effort_log_test.rb" "test/unit/google_apps_test.rb" "test/unit/page_test.rb" "test/unit/paper_test.rb" "test/unit/person_test.rb" "test/unit/project_test.rb" "test/unit/project_type_test.rb" "test/unit/rss_feed_test.rb" "test/unit/scotty_dog_saying_test.rb" "test/unit/task_type_test.rb" "test/unit/team_test.rb" "test/unit/time_machine_test.rb" "test/unit/user_test.rb" 
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Test::Unit::UI::SILENT (NameError)
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `rake_original_const_missing'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/test-unit-1.2.3/lib/test/unit/autorunner.rb:47
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:\Program Files (x86)\JetBrains\RubyMine 97.39/rb/testing\patch\testunit/test/unit/autorunner.rb:24
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/test-unit-2.1.1/lib/test/unit.rb:2
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/test_unit.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda.rb:8
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
    from C:/CodeMetrics/2nd/cmusv/config/boot.rb:43:in `load_gems'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:164:in `process'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
    from C:/CodeMetrics/2nd/cmusv/config/environment.rb:17
    from ./test/test_helper.rb:2:in `require'
    from ./test/test_helper.rb:2
    from ./test/unit/course_number_test.rb:1:in `require'
    from ./test/unit/course_number_test.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/courses_controller_test.rb" "test/functional/course_numbers_controller_test.rb" "test/functional/curriculum_comments_controller_test.rb" "test/functional/curriculum_comment_types_controller_test.rb" "test/functional/effort_logs_controller_test.rb" "test/functional/effort_log_line_items_controller_test.rb" "test/functional/effort_reports_controller_test.rb" "test/functional/mailing_lists_controller_test.rb" "test/functional/pages_controller_test.rb" "test/functional/papers_controller_test.rb" "test/functional/people_controller_test.rb" "test/functional/projects_controller_test.rb" "test/functional/project_types_controller_test.rb" "test/functional/rss_feeds_controller_test.rb" "test/functional/scotty_dog_sayings_controller_test.rb" "test/functional/sessions_controller_test.rb" "test/functional/system_controller_test.rb" "test/functional/task_types_controller_test.rb" "test/functional/teams_controller_test.rb" "test/functional/users_controller_test.rb" "test/functional/welcome_controller_test.rb" 
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Test::Unit::UI::SILENT (NameError)
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `rake_original_const_missing'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/test-unit-1.2.3/lib/test/unit/autorunner.rb:47
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:\Program Files (x86)\JetBrains\RubyMine 97.39/rb/testing\patch\testunit/test/unit/autorunner.rb:24
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/test-unit-2.1.1/lib/test/unit.rb:2
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/test_unit.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda.rb:8
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
    from C:/CodeMetrics/2nd/cmusv/config/boot.rb:43:in `load_gems'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:164:in `process'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
    from C:/CodeMetrics/2nd/cmusv/config/environment.rb:17
    from ./test/test_helper.rb:2:in `require'
    from ./test/test_helper.rb:2
    from ./test/functional/courses_controller_test.rb:1:in `require'
    from ./test/functional/courses_controller_test.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"  
Errors running test:units and test:functionals!
Empty test suite.

Process finished with exit code 1

从命令行运行与从 RubyMine 内运行有什么区别?

I am trying to use RubyMine to run the tests in an existing project. Unfortunately, whenever I attempt to do so I receive the message that No tests were found and the bottom of test console output I see the message:

Errors running test:units and test:functionals!
Empty test suite.

Process finished with exit code 1

I have tried running the tests with and without the command
-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) but haven't tweaked the default test configuration beyond that. Below is the current configuration as a reference:

RubyMine Run/Debug Configuration

Full dump of test console from within RubyMine:

C:\Ruby187\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby187\bin/rake test
Testing started at 1:41 PM ...
(in C:/CodeMetrics/2nd/cmusv)
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/course_number_test.rb" "test/unit/course_test.rb" "test/unit/curriculum_comment_test.rb" "test/unit/curriculum_comment_type_test.rb" "test/unit/effort_log_line_item_test.rb" "test/unit/effort_log_mailer_test.rb" "test/unit/effort_log_template_test.rb" "test/unit/effort_log_test.rb" "test/unit/google_apps_test.rb" "test/unit/page_test.rb" "test/unit/paper_test.rb" "test/unit/person_test.rb" "test/unit/project_test.rb" "test/unit/project_type_test.rb" "test/unit/rss_feed_test.rb" "test/unit/scotty_dog_saying_test.rb" "test/unit/task_type_test.rb" "test/unit/team_test.rb" "test/unit/time_machine_test.rb" "test/unit/user_test.rb" 
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Test::Unit::UI::SILENT (NameError)
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `rake_original_const_missing'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/test-unit-1.2.3/lib/test/unit/autorunner.rb:47
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:\Program Files (x86)\JetBrains\RubyMine 97.39/rb/testing\patch\testunit/test/unit/autorunner.rb:24
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/test-unit-2.1.1/lib/test/unit.rb:2
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/test_unit.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda.rb:8
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
    from C:/CodeMetrics/2nd/cmusv/config/boot.rb:43:in `load_gems'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:164:in `process'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
    from C:/CodeMetrics/2nd/cmusv/config/environment.rb:17
    from ./test/test_helper.rb:2:in `require'
    from ./test/test_helper.rb:2
    from ./test/unit/course_number_test.rb:1:in `require'
    from ./test/unit/course_number_test.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/courses_controller_test.rb" "test/functional/course_numbers_controller_test.rb" "test/functional/curriculum_comments_controller_test.rb" "test/functional/curriculum_comment_types_controller_test.rb" "test/functional/effort_logs_controller_test.rb" "test/functional/effort_log_line_items_controller_test.rb" "test/functional/effort_reports_controller_test.rb" "test/functional/mailing_lists_controller_test.rb" "test/functional/pages_controller_test.rb" "test/functional/papers_controller_test.rb" "test/functional/people_controller_test.rb" "test/functional/projects_controller_test.rb" "test/functional/project_types_controller_test.rb" "test/functional/rss_feeds_controller_test.rb" "test/functional/scotty_dog_sayings_controller_test.rb" "test/functional/sessions_controller_test.rb" "test/functional/system_controller_test.rb" "test/functional/task_types_controller_test.rb" "test/functional/teams_controller_test.rb" "test/functional/users_controller_test.rb" "test/functional/welcome_controller_test.rb" 
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Test::Unit::UI::SILENT (NameError)
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `rake_original_const_missing'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/test-unit-1.2.3/lib/test/unit/autorunner.rb:47
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:\Program Files (x86)\JetBrains\RubyMine 97.39/rb/testing\patch\testunit/test/unit/autorunner.rb:24
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/test-unit-2.1.1/lib/test/unit.rb:2
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/integrations/test_unit.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda.rb:8
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
    from C:/CodeMetrics/2nd/cmusv/config/boot.rb:43:in `load_gems'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:164:in `process'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
    from C:/CodeMetrics/2nd/cmusv/config/environment.rb:17
    from ./test/test_helper.rb:2:in `require'
    from ./test/test_helper.rb:2
    from ./test/functional/courses_controller_test.rb:1:in `require'
    from ./test/functional/courses_controller_test.rb:1
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/Ruby187/bin/ruby.exe -I"lib;test" "C:/CodeMetrics/2nd/cmusv/autotest-growl/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"  
Errors running test:units and test:functionals!
Empty test suite.

Process finished with exit code 1

What's the difference between running from the command line and from within RubyMine?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

挽心 2024-10-06 09:07:32

看起来这可能与 ruby​​mine 设置的环境(C:/CodeMetrics/2nd/cmusv/)以及最新的测试单元 gem 与 Rails 2.x 的不兼容有关。如果您没有指定要安装的 gem 版本,则可能是罪魁祸首(请参阅此处的讨论)。

尝试在项目配置中将测试单元 gem 恢复到 1.2.3。

It looks like this may have something to do with the environment rubymine sets up (C:/CodeMetrics/2nd/cmusv/) and the latest test-unit gem's incompatibility with Rails 2.x. If you didn't specify a version of the gem to install, that's likely the culprit (See discussion here).

Try reverting the test-unit gem back to 1.2.3 in your project's configuration.

只有一腔孤勇 2024-10-06 09:07:32

对我有用的是删除环境变量“RAILS_ENV=test”。之后一切都很棒!

RubyMine v-3.2.4 和v-4.0Beta RM-112.49

Ruby 1.9.3 和 Ruby 1.9.2

What worked for me was REMOVING the Environment variable "RAILS_ENV=test". After that everything was great!

RubyMine v-3.2.4 & v-4.0Beta RM-112.49

Ruby 1.9.3 and Ruby 1.9.2

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文