2010-07-30 77 views
1

我跑 耙寶石:安裝 耙寶石:解壓`load_missing_constant「:未初始化不斷的Rails :: Railtie

如果我添加了RSpec的護欄寶石到config/environment.rb:

   config.gem "rspec-rails", :version => ">= 1.3.2" 

然後運行服務器。我收到此錯誤:

/home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: 
Gem::Dependency#version_requirements is deprecated and will be removed 
on or after August 2010. Use #requirement 
/home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in 
`load_missing_constant': uninitialized constant Rails::Railtie 
(NameError) 
    from 
/home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in 
`const_missing' 
    from 
/home/Amit/Myworkspace/MyApplication/vendor/gems/rspec-rails-2.0.0.beta.19/lib/rspec-rails.rb:3 
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require' 
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`require' 
    from 
/home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in 
`require' 
    from 
/home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:208:in 
`load' 
    from 
/home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in 
`load_gems' 
    from 
/home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in 
`each' 
    ... 11 levels... 
    from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load' 
    from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 
    from /usr/bin/rcov:19:in `load' 
    from /usr/bin/rcov:19 

回答

相關問題