SameShirtEveryDay.com

Personal blog of the one called Alex Gorbatchev, from Toronto, Canada.

in `latest_partials’: undefined method `[]‘ for nil:NilClass

Posted on June 19th, 2007 by Alex Gorbatchev. In Ruby. 4 comments!

If you are suddenly getting in `latest_partials': undefined method `[]' for nil:NilClass error when calling some gem methods like Gem.latest_load_paths or Gem.path, check your gems folder (on a PC it’s /Ruby/lib/ruby/gems/1.8/gems). Make sure there are no foreign folders or files in there. Rubygems expects all folders to be in <name>-<version> format.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 comments.

  1. Eric

    Thanks! I’ve been struggling with this on autotest for a couple weeks now – and your the first place that gave me the correct answer.

  2. Mate, I have this issue too. What do you mean by foreign folders?

    Cheers
    Nigel

  3. Alex Gorbatchev

    If there are any folders or files which don’t fit the format [name]-[version] you will get that error.

  4. Matt

    Thanks! That did it. Mac users: just run Gem.path from console if you need to know your gem path. Mine was /opt/local/lib/ruby/gems/1.8/

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> , rel="nofollow" in use - no link dropping, no keywords or domains as names; do not spam, and do not advertise!

home
Subscribe to this blog Follow me on Twitter My bookmarks on Delicious My photography on Flickr