Problem with ruby Gems

Godwin's Avatar

Godwin

30 Mar, 2010 12:15 PM

Hello everyone, I am learning Ruby and Rails. I have tutorials that I am following, I usually get these error messages each time I try to run GEM INSTALL UPDATES:

C:\Users\imedia2>gem install updates
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
WARNING: RubyGems 1.2+ index not found for:

    http://gems.rubyforge.org/

RubyGems will revert to legacy indexes degrading performance.
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: While executing gem ... (Gem::RemoteSourceException)

Error fetching remote gem cache: SocketError: initialize: name or service not known (http://gems.rubyforge.org/yaml)

Due to these Errors, I have not been able to even run Rails using Net Beans. Please I will be very glad if I am attended to. Thank you all in anticipation.

  1. Support Staff 1 Posted by Nick Quaranto on 30 Mar, 2010 01:46 PM

    Nick Quaranto's Avatar

    What version of RubyGems are you on? (gem env) Definitely update if it's not > 1.3.x with gem update --system

  2. 2 Posted by Godwin on 30 Mar, 2010 02:03 PM

    Godwin's Avatar

    After running the (gem env), I got this result showing the version as 1.3.1

    C:\Users\imedia2>gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2009-07-23 patchlevel 287) [java] - INSTALLATION DIRECTORY: C:/Program Files/NetBeans 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Program Files/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/../bin/jruby.bat - EXECUTABLE DIRECTORY: C:/Program Files/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/../bin - RUBYGEMS PLATFORMS:

    - ruby
    - universal-java-1.6
    
    • GEM PATHS:
      • C:/Program Files/NetBeans 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
      • "install" => "--env-shebang"
      • "update" => "--env-shebang"
    • REMOTE SOURCES:
  3. 3 Posted by Godwin on 30 Mar, 2010 02:08 PM

    Godwin's Avatar

    Hello, again I ran (gem update --system) and got the following error message:

    C:\Users\imedia2>gem update --system
    JRuby limited openssl loaded. gem install jruby-openssl for full support.
    http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
    Updating RubyGems
    WARNING: RubyGems 1.2+ index not found for:

        http://gems.rubyforge.org/
    

    RubyGems will revert to legacy indexes degrading performance.
    Bulk updating Gem source index for: http://gems.rubyforge.org/
    ERROR: While executing gem ... (Gem::RemoteSourceException)

    Error fetching remote gem cache: SocketError: initialize: name or service not known (http://gems.rubyforge.org/yaml).
    
  4. Support Staff 4 Posted by Nick Quaranto on 14 Apr, 2010 01:32 PM

    Nick Quaranto's Avatar

    This is really strange. Are you behind a firewall or NAT? Is it still happening? What if you set your gem sources in your ~/.gemrc to just http://rubygems.org ?

  5. 5 Posted by Suresh on 30 May, 2010 04:39 AM

    Suresh's Avatar

    I am also getting the similar error.
    WARNING: RubyGems 1.2+ index not found for:

    ERROR : could not find gem builder locally or in a repository.

    Strangely, there is no URL specified after this line either.

    But I am behind a NAT.

    Any extra configurations or parameters required if it is behind a NAT ?

    Thanks in advance

  6. Support Staff 6 Posted by Nick Quaranto on 13 Jul, 2010 09:15 PM

    Nick Quaranto's Avatar

    As far as I know, RubyGems doesn't work behind a NAT and there's no real resolution yet. You could set your gem source to http://production.s3.rubygems.org/ and that might help. Could you paste the output of gem list -rV ?

  7. 7 Posted by Hajer Ali on 27 Aug, 2010 09:28 PM

    Hajer Ali's Avatar

    I also try to learn Ruby On Rails with tutorial and I think I am facing similar problem,

    I need to update rails version from 2.0.2 to 2.2.2 as recommended in the book,

    so I wrote the following command:

    E:\INSTAN~1\rails_apps>gem install rails --version 2.2.2

    and I got the following error:

    ERROR: While executing gem ... (Gem::RemoteSourceException)

    HTTP Response 302 fetching http://gems.rubyforge.org/yaml

    also when I try to run another command :
    E:\INSTAN~1\rails_apps>gem list -rV

    I got similar error too :
    REMOTE GEMS

    ERROR: While executing gem ... (Gem::RemoteSourceException)

    HTTP Response 302 fetching http://gems.rubyforge.org/yaml

    Any help? Thank you.

  8. 8 Posted by Hajer Ali on 28 Aug, 2010 09:56 PM

    Hajer Ali's Avatar

    my problem has been solved by the following steps:

    1- I downloaded RubyGems again from this link

    http://rubyonrails.org/download

    2- Then I followed the steps in this link

    http://www.msquaredweb.com/blog/articles/InstallingRailsOnWindowsXP...

    But to install rails 2.2.2 I wrote this command in the console

    gem instal rails --version 2.2.2

  9. Support Staff 9 Posted by Nick Quaranto on 31 Aug, 2010 03:16 AM

    Nick Quaranto's Avatar

    Great, resolving this issue then.

    For future reference, please use http://rubyinstaller.org, it's way easier and more up to date.

  10. Nick Quaranto closed this discussion on 31 Aug, 2010 03:16 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac