I am getting an error when installing certain gems. I am using ubuntu 10.10. The error messages shows this.
ERROR: While executing gem ... (NoMethodError)
undefined method `spec' for nil:NilClass
I had exactly the same error as this...
While installing Rails 3 my computer suffered a power outage. After restarting the computer and continuing the Rails 3 installation the process failed with this exact same error. The problem was due to the gem install cache which had corrupted / empty gem files. My solution was to clear this cache and run the install again, as follows:
gem env
ls -l /usr/lib/ruby/gems/1.8/cache/
gem list
rm
ls -l /usr/lib/ruby/gems/1.8/specifications/
sudo gem install -v=3.0.6 rails --no-rdoc --no-ri
Hope this helps someone else who has a power outage or other external failure during a gem install process!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With