Unable to install gems from local folder

Li Zhang's Avatar

Li Zhang

08 Jul, 2014 10:46 AM

I'm trying to install some gems on my coperate server which is isolated from internet. There is no proxy server for this server to access internet.

When i tried to follow the tips bellow to install gems on my server, i got some errors and the installation failed. If I do the same thing on my VM which can access internet, the installation can succeed.

http://help.rubygems.org/kb/rubygems/installing-gems-with-no-network

gem install --force --local chef-11.12.8.gem

ERROR: While executing gem ... (Errno::ECONNREFUSED)
Connection refused - recvfrom(2)

gem install --force --local chef-11.12.8.gem --debug

ERROR: While executing gem ... (Errno::ECONNREFUSED)
Connection refused - recvfrom(2) /usr/lib/ruby/1.8/resolv.rb:728:in recv' /usr/lib/ruby/1.8/resolv.rb:728:inrecv_reply' /usr/lib/ruby/1.8/resolv.rb:624:in request' /usr/lib/ruby/1.8/resolv.rb:489:ineach_resource' /usr/lib/ruby/1.8/resolv.rb:971:in resolv' /usr/lib/ruby/1.8/resolv.rb:969:ineach' /usr/lib/ruby/1.8/resolv.rb:969:in resolv' /usr/lib/ruby/1.8/resolv.rb:968:ineach' /usr/lib/ruby/1.8/resolv.rb:968:in resolv' /usr/lib/ruby/1.8/resolv.rb:966:ineach' /usr/lib/ruby/1.8/resolv.rb:966:in resolv' /usr/lib/ruby/1.8/resolv.rb:481:ineach_resource' /usr/lib/ruby/1.8/resolv.rb:458:in getresource' /usr/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:92:inapi_endpoint' /usr/lib/ruby/site_ruby/1.8/rubygems/source.rb:42:in api_uri' /usr/lib/ruby/site_ruby/1.8/rubygems/source.rb:81:independency_resolver_set' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver/best_set.rb:23:in pick_sets' /usr/lib/ruby/site_ruby/1.8/rubygems/source_list.rb:97:ineach' /usr/lib/ruby/site_ruby/1.8/rubygems/source_list.rb:97:in each_source' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver/best_set.rb:22:inpick_sets' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver/best_set.rb:34:in prefetch' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver/installer_set.rb:157:inprefetch' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver.rb:165:in requests' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver.rb:388:inresolve_for_multiple' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver.rb:340:in resolve_for' /usr/lib/ruby/site_ruby/1.8/rubygems/resolver.rb:189:inresolve' /usr/lib/ruby/site_ruby/1.8/rubygems/request_set.rb:293:in resolve' /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:468:inresolve_dependencies' /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:238:in install_gem' /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:291:ininstall_gems' /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:287:in each' /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:287:ininstall_gems' /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:202:in execute' /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb:307:ininvoke_with_build_args' /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:167:in process_args' /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:137:inrun' /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:54:in `run'

Could you please help on this issue? Thanks

  1. 1 Posted by Li Zhang on 08 Jul, 2014 11:46 AM

    Li Zhang's Avatar

    issue was solved by running:

    gem sources -r https://rubygems.org/

    gem source file://......

    gem generate_index

    builder gem needs to be installed previouly.

  2. Nick Quaranto closed this discussion on 16 Aug, 2014 06:23 PM.

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

Recent Discussions

30 Oct, 2014 04:34 PM
30 Oct, 2014 02:46 PM
28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM