`load_missing_constant':未初始化的常量Rails :: Railtie

时间:2010-07-30 11:00:51

标签: ruby-on-rails ruby-on-rails-plugins

我跑了  耙宝石:安装  rake gems:unpack

如果我在config / environment.rb中添加了rspec-rails gem:

             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