autotest/rspec/rubygems problems

| | Comments (5)

I just finished diagnosing a problem with two users who were both seeing the following stack trace when firing up autotest:

.../rubygems.rb:325:in `latest_partials':
    undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:322:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:322:in `latest_partials'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:292:in `latest_load_paths'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:291:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:291:in `latest_load_paths'
from /usr/local/lib/ruby/gems/1.8/gems/ZenTest-3.6.0/lib/autotest.rb:109:in `
autodiscover'
from /usr/local/lib/ruby/gems/1.8/gems/ZenTest-3.6.0/bin/autotest:36
from /usr/local/bin/autotest:18:in `load'
from /usr/local/bin/autotest:18

It apparently turns out (ironically), that rspec 0.8 or so installed a bogus gem named "web_spec" with no version or anything and was choking the latest_load_paths method I was using in rubygems. This gem wasn't removed when you removed rspec so it might still be floating around in your system. If so, please remove it.

cd `gem env gem path`/gems
sudo rm -rf web_spec*
cd ../specs
sudo rm -rf web_spec*

5 Comments

Thanks for posting this. I'll make sure this is well doc'd.

Ah! Had the very same problem, but after removing the bogus 'web_spec' gem I ran into the following error using autotest with rails:

script/spec:3:in `require': no such file to load -- spec (LoadError) from script/spec:3

I figured out I just needed to add "require 'rubygems'" to the script/spec file. So everything is working fine now, just wanted to share this incase anyone else runs into this problem.

I ran into the same problem, but it was caused by a sym link in my gems dir. I removed the link and autotest works fine.

I have had this same error message trying to use autotest. After deleting the web_spec* gem I am still getting the very same message. Any further ideas?

It worked! Thanks, I was banging my head against the wall over this.

Leave a comment

About this Entry

This page contains a single entry by zenspider published on May 30, 2007 11:14 AM.

autotest 3.6.0 and rspec was the previous entry in this blog.

image_science version 1.1.3 has been released! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en