Я не могу запустить модульные тесты для моего приложения Ruby on Rails. У меня JRuby 1.6.4 на Windows 7 x64 и 32x - обе среды сталкиваются с одной и той же проблемой.
Когда я запускаю команду "rake test", вывод выглядит следующим образом:
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method TrainerWeb::Application#task called at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:214:in `initialize_tasks'
DEPRECATION WARNING: Rake tasks in D:/Work/P/Documents/NetBeansProjects/myproject/vendor/plugins/restful-authentication/tasks/auth.rake are deprecated. Use lib/tasks instead. (called from (root) at D:/Work/P/Documents/NetBeansProjects/myproject/Rakefile:13)
LoadError: no such file to load -- rake
require at org/jruby/RubyKernel.java:1038
(root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
LoadError: no such file to load -- rake
require at org/jruby/RubyKernel.java:1038
(root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
LoadError: no such file to load -- rake
require at org/jruby/RubyKernel.java:1038
(root) at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:1
Errors running test:units, test:functionals, test:integration!
Для irb команда require 'rake' дает следующий вывод:
irb(main):001:0> require 'rake'
LoadError: no such file to load -- rake
from org/jruby/RubyKernel.java:1038:in `require'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:158:in `eval_input'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:271:in `signal_status'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1419:in `loop'
from org/jruby/RubyKernel.java:1191:in `catch'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:154:in `eval_input'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1191:in `catch'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:70:in `start'
from C:\Program Files\jruby-1.6.4\bin\irb:13:in `(root)'
Мои попытки запустить тесты в NetBeans приводят к другому выводу:
Test-unit version : 2.4.5 loaded
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method TrainerWeb::Application#task called at C:/Program Files/jruby-1.6.4/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:214:in `initialize_tasks'
DEPRECATION WARNING: Rake tasks in D:/Work/P/Documents/NetBeansProjects/myproject/vendor/plugins/restful-authentication/tasks/auth.rake are deprecated. Use lib/tasks instead. (called from (root) at D:/Work/P/Documents/NetBeansProjects/myproject/Rakefile:13)
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
'"C:/Program Files/jruby-1.6.4/bin/jruby.bat.exe"' is not recognized as an internal or external command,
operable program or batch file.
Errors running test:units, test:functionals, test:integration!
Finished in 0.0 seconds.
0 tests, 0 failures, 0 errors
Gemfile имеет ссылку на грабли.
Я не нашел достойного решения в Интернете.