Issue
I'm trying to get started with ruby and Watir-webdriver for some test automation.
sudo apt-get install ruby rubygems
sudo gem install watir-webdriver
Whenever I gem install I'm getting these errors like :
[/usr/lib/ruby/gems/1.8/specifications/selenium-webdriver-2.13.0.gemspec] isn't a Gem::Specification (NilClass instead).
ERROR: While executing gem ... (NoMethodError)
undefined method `spec' for nil:NilClass
Solution
The problem was due to corrupted downloads being stored in the cache, so that even after gem uninstall
and reinstall, the error persisted. To force re-download, I emptied the cache directories which are found by checking under GEM PATHS in the output of the command gem env
.
Answered By - wim Answer Checked By - Robin (WPSolving Admin)