Note to self: when autotest fails...

Posted by # January 15th 12:33 PM

I just run into the following error when running autotest within a Rails app:


/Users/jarkko/Sites/koulutusweb/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:402:in `to_constant_name': Anonymous modules have no name to be referenced by (ArgumentError)
    from /Users/jarkko/Sites/koulutusweb/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:214:in `qualified_name_for'
    from /Users/jarkko/Sites/koulutusweb/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:477:in `const_missing'
    from /Users/jarkko/Sites/koulutusweb/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:7:in `reset'
    from /Users/jarkko/Sites/koulutusweb/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:59
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
    from /Users/jarkko/Sites/koulutusweb/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
    from /Users/jarkko/Sites/koulutusweb/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
     ... 59 levels...
    from /Library/Ruby/Gems/1.8/gems/rspec-1.0.8/lib/spec/runner/command_line.rb:17:in `run'
    from /Library/Ruby/Gems/1.8/gems/rspec-1.0.8/bin/spec:3
    from /usr/bin/spec:19:in `load'
    from /usr/bin/spec:19

It turned out I had typed “sudo gem update zentest” to get the latest version of the gem. However, the correct way would have been to use the camel-cased version ZenTest. The funny thing is, that if you run the command in lower case (like I’m use to do with RubyGems), you will get ZenTest, it’s just version 3.5.0 (as opposed to 3.8 that I supposedly got).

So here’s hoping that the next time I do the same mistake, this page will pop up from the big G.

Jump to comment form

Comments

  1. Karmen Blake 01.15.08 / 17PM

    I did this last week. I thought it was so weird.

  2. Ryan Davis 01.16.08 / 02AM

    wow… this comment box is freakin TINY… Already full.

    That said, independent of your blog post, I had this fixed last night. Turns out that gems in the gem repo aren’t removed when you delete a release from rubyforge.

  3. Jarkko 01.16.08 / 19PM

    Ryan,

    Thanks for the fix! I guess I should’ve reported it to you as well, but what gives…

    Re: the comment box: yeah, it’s shrinked, I think the last cap deploy of the mephisto instance lost some of the css changes made in the mephisto admin UI. Will look into it.

Have your say

A name is required. You may use Textile in your comments.