Authlogic和RSpec的问题

时间:2011-09-21 10:57:08

标签: ruby-on-rails ruby-on-rails-3 rspec authlogic rspec-rails

我正在使用Authlogic gem编写一个简单的Survey应用程序。当我使用内置测试工具的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。请任何人都可以建议我哪里出错了。 版本: 红宝石-1.9.2 rails - 3.0.10 authlogic - 3.0.3 rspec -2.6.0

提前致谢

0 个答案:

没有答案