开发者

`load_missing_constant': uninitialized constant Rails::Railtie

开发者 https://www.devze.com 2023-01-10 01:36 出处:网络
I run rake gems:install rake gems:unpack If I add the rspec-rails gem in config/environment.rb: config.gem \"rspec-rails\", :version => \">= 1.3.2\"

I run rake gems:install rake gems:unpack

If I add the rspec-rails gem in config/environment.rb:

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

and then run server. I am getting this error:

/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/act开发者_开发技巧ivesupport/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


Check these resources out:

http://www.jamievandyke.com/the-inherited-resources-railties-error

http://anlek.com/2010/03/uninitialized-constant-railsrailtie/

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消