How to solve `cached_specs’: undefined method `spec’ for nil:NilClass error
October 27, 2010 § 6 Comments
I try to run “bundle install” (bundler gem) and in the middle of the installation process i got my hardisk space is full. so i cut the process and remove some data then try to install again, so i run the “bundle install” again and get error like this :
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:199:in `cached_specs': undefined method `spec' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:196:in `cached_specs’
and many moooorreeee…..
that error caused of broken installation of the gems that using “bundle install” so to solve it we must delete the broken file (gem).
we can locate the current gem folder using:
gem list -d bundler
then we can see there is a cahce folder, u can remove or rename the folder (actually all we need just delete the current broken file) 😀
done, it works for me.. hope for you too 🙂