我的rails应用程序与Ruby 1.8.7运行良好。现在我想用JRuby测试我的rails应用程序。但JRuby告诉我它无法自动加载某些文件,但这些文件在路径中存在正确。
LoadError (Expected E:/youwenti/app/models/article/reference_aspect.rb to define
Article::ReferenceAspect):
app/models/article.rb:6:in `Article'
app/models/article.rb:3:in `(root)'
org/jruby/RubyKernel.java:1058:in `load'
org/jruby/RubyKernel.java:2080:in `send'
app/models/article.rb:99:in `latest'
app/controllers/groups_controller.rb:36:in `show'
app/controllers/groups_controller.rb:21:in `index'
org/jruby/RubyKernel.java:2076:in `send'
org/jruby/RubyKernel.java:2076:in `send'
compass (0.11.7) lib/compass/app_integration/rails/actionpack2/action_controll
er.rb:7:in `process_with_compass'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:220:in `call'
sass (3.1.15) rails/./lib/sass/plugin/rack.rb:54:in `call'
org/jruby/RubyArray.java:1615:in `each'
org/jruby/RubyArray.java:1615:in `each'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:224:in `call'
我已在Article::ReferenceAspect
中定义了E:/youwenti/app/models/article/reference_aspect.rb
。如何解决问题?
Rails版本是2.3.14
JRuby版本
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows XP-x86-java]