This post originated from an RSS feed registered with Ruby Buzz
by rwdaigle.
Original Post: "loaded_specs" Gem Error
Feed Title: Ryan's Scraps
Feed URL: http://feeds.feedburner.com/RyansScraps
Feed Description: Ryan Daigle's various technically inclined rants along w/ the "What's new in Edge Rails" series.
For those of you that have run into this gem error when running the latest rails:
./script/../config/../vendor/rails/railties/lib/initializer.rb:175:in `install_gem_spec_stubs': undefined method `loaded_specs' for Gem:Module (NoMethodError)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:175:in `reject!'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:175:in `install_gem_spec_stubs'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:89:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:89:in `run'
from ./script/../config/boot.rb:46:in `load_initializer'
from ./script/../config/boot.rb:38:in `run'
from ./script/../config/boot.rb:11:in `boot!'
from ./script/../config/boot.rb:109
from script/dbconsole:2:in `require'
from script/dbconsole:2
the solution is a quick and dirty:
gem update --system
Or, if you currently have rubygems v0.8.4 or earlier installed:
gem install rubygems-update
update_rubygems
Just a public service announcement from the “Ryan’s been bitten by this one” dept.