Struggling With RubyGems

Discussion in 'Ruby' started by James Edward Gray II, Jan 17, 2007.

  1. I can't seen to query or install gems over here. Is anyone else
    seeing something like this, or have I screwed up my local install?

    $ gem query -r --name-matches highline

    *** REMOTE GEMS ***
    ERROR: While executing gem ... (NoMethodError)
    undefined method `refresh' for #<Hash:0x57c704>

    James Edward Gray II
     
    James Edward Gray II, Jan 17, 2007
    #1
    1. Advertisements

  2. James Edward Gray II

    Phrogz Guest

    May be just you. Mine's working:

    C:\>gem query -r --name-matches highline

    *** REMOTE GEMS ***
    Bulk updating Gem source index for: http://gems.rubyforge.org

    highline (1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.0.4, 1.0.2, 1.0.1,
    1.0.0, 0.6.1, 0.6.0, 0.5.0, 0.4.0, 0.3.0, 0.2.0)
    HighLine is a high-level command-line IO library.

    C:\>gem --version
    0.9.0

    C:\>ruby -v
    ruby 1.8.5 (2006-08-25) [i386-mswin32]
     
    Phrogz, Jan 17, 2007
    #2
    1. Advertisements

  3. I'm getting the same thing after upgrading to 0.9.1, and on gem install or
    gem update as well. Help?
    --Greg
     
    Gregory Seidman, Jan 17, 2007
    #3
  4. This does appear to be related to my upgrade to 0.9.1. Downgrading
    has resolved the issue, for now.

    James Edward Gray II
     
    James Edward Gray II, Jan 17, 2007
    #4
  5. Mine is broken since I updated to 0.9.1 today.

    ~ cremes$ gem query -r --name-matches highline

    *** REMOTE GEMS ***
    Bulk updating Gem source index for: http://gems.rubyforge.org
    ERROR: While executing gem ... (NoMethodError)
    undefined method `source_index' for #<Hash:0x2db547c>
    ~ cremes$ gem --version
    0.9.1
    ~ cremes$ ruby -v
    ruby 1.8.4 (2005-12-24) [powerpc-darwin8.6.0]

    cr
     
    cremes.devlist, Jan 17, 2007
    #5
  6. I had the same issue. Deleting the 'source_cache' file from my gems
    directory solved it for me.

    Dave
     
    David Goodlad, Jan 17, 2007
    #6
  7.  
    James Edward Gray II, Jan 17, 2007
    #7
  8. James Edward Gray II

    Tim Pease Guest

    James, did you clear out the source_cache for root?

    Your query worked because you did it as you. Your install did not
    work because you tried to do it as root.

    Just a thought.

    Blessings,
    TwP
     
    Tim Pease, Jan 17, 2007
    #8
  9. James Edward Gray II

    Tim Pease Guest

    Never mind. There is only one source_cache :/ Doh!

    I'll just go back to whatever it was I was doing over there ... ooh,
    look! Butterfly!

    TwP
     
    Tim Pease, Jan 17, 2007
    #9
  10. Actually, I originally cleared ~/.gem/source_cache. When you
    mentioned it, I cleared the one in root's home folder as well. When
    you gave me this final hint though, I found the one in /usr/local/lib/
    ruby/gems/ and nuking that one did the trick. I can now query and
    install.

    Thanks for all the fresh ideas.

    James Edward Gray II
     
    James Edward Gray II, Jan 17, 2007
    #10
  11. James Edward Gray II

    Eric Hodel Guest

    Please archive your source cache and send it to me, should you have
    this in the future.

    Also, what does 'gem sources' say?
     
    Eric Hodel, Jan 18, 2007
    #11
  12. $ gem sources
    *** CURRENT SOURCES ***

    http://gems.rubyforge.org

    James Edward Gray II
     
    James Edward Gray II, Jan 18, 2007
    #12
  13. James Edward Gray II

    Eric Hodel Guest

    Eric Hodel, Jan 18, 2007
    #13
  14. James Edward Gray II

    Lyle Johnson Guest

    I am still having this problem, although I have not zapped my various
    source_cache files yet. I will send copies of my source_cache files to
    Eric, offline.
     
    Lyle Johnson, Jan 18, 2007
    #14
  15. James Edward Gray II, Jan 18, 2007
    #15
  16. FWIW, I was having the same problem, but sudo gem sources appears to
    have fixed it.


    --
    Jason Perkins


    "The computer allows you to make mistakes
    faster than any other invention, with the
    possible exception of handguns and tequila."

    -Mitch Ratcliffe
     
    Jason Perkins, Jan 18, 2007
    #16
  17. James Edward Gray II

    James Byrne Guest

    I had this problem as well and executing

    # gem sources

    as root did not clear it until I had manually removed the old
    source_cache.

    # rm /usr/lib/ruby/gems/1.8/source_cache

    I have a tar archive available of the orginal source_cache if that would
    be of any use.
     
    James Byrne, Jan 24, 2007
    #17
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.