我正在使用 Authlogic gem 编写一个简单的调查应用程序。当我使用内置测试工具的 rails 进行测试时,一切正常,但现在使用 Rspec 我收到以下错误:当它尝试运行命令时出现此错误require "authlogic/testcase" from spec_helper.rb
/home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require': no such file to load -- authlogic/testcase (LoadError)
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /home/gunanka/survey/spec/spec_helper.rb:8:in `<top (required)>'
from /home/gunanka/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gunanka/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gunanka/survey/spec/controllers/users_controller_spec.rb:1:in `<top (required)>'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'
from /home/gunanka/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'
它试图从 activesupport/dependencies 而不是 authlogic 获取 authlogic/testcase。请任何人都可以建议我哪里出错了。版本:ruby -1.9.2 rails - 3.0.10 authlogic - 3.0.3 rspec -2.6.0
提前致谢