Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy support… #6

Open
victornoel opened this issue Nov 4, 2010 · 4 comments
Open

proxy support… #6

victornoel opened this issue Nov 4, 2010 · 4 comments

Comments

@victornoel
Copy link

Hello,

I am trying to use a gem that needs your gem, but I am blocked because I use a proxy and it seems that to download http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz your gem does not follow the proxy used by "gems install".

[victor@volte src]$ gem install linecache19 -p http://proxy.irit.fr:8001
Building native extensions. This could take a while...
ERROR: Error installing linecache19:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/usr/lib/ruby/1.9.1/net/http.rb:644:in initialize': Connection timed out - connect(2) (Errno::ETIMEDOUT) from /usr/lib/ruby/1.9.1/net/http.rb:644:inopen'
from /usr/lib/ruby/1.9.1/net/http.rb:644:in block in connect' from /usr/lib/ruby/1.9.1/timeout.rb:44:intimeout'
from /usr/lib/ruby/1.9.1/timeout.rb:87:in timeout' from /usr/lib/ruby/1.9.1/net/http.rb:644:inconnect'
from /usr/lib/ruby/1.9.1/net/http.rb:637:in do_start' from /usr/lib/ruby/1.9.1/net/http.rb:626:instart'
from /usr/lib/ruby/1.9.1/net/http.rb:1160:in request' from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:239:inblock in read'
from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:286:in connect' from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:234:inread'
from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:128:in download' from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:55:inblock in create_makefile_with_core'
from /usr/lib/ruby/1.9.1/tempfile.rb:320:in open' from /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:51:increate_makefile_with_core'
from extconf.rb:20:in `

'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz

Gem files will remain installed in /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/linecache19-0.5.11 for inspection.
Results logged to /home/victor/code/pkgbuild/diaspora-git/src/diaspora-gems/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out

@fnando
Copy link

fnando commented Nov 17, 2010

+1 for this fix... we're trying to install ruby-debug19 in our CI server that's behind a proxy, but we have to do it by hand. :(

@fnando
Copy link

fnando commented Nov 17, 2010

Reading the source code, I made it work by copying the ruby source (ruby-1.9.2-p0 directory) to /var/lib/hudson/jobs/nephelae# ls /opt/ruby/1.9.2-p0/include/ruby-1.9.1/ruby-1.9.2-p0, where our ruby installation lives.

@liyuray
Copy link

liyuray commented Aug 1, 2011

Seems that ruby_core_source only recognize HTTP_PROXY environment variable in upper case. "http_proxy" is not recognized.

@avalez
Copy link

avalez commented Jun 28, 2012

It's also necessary to add HTTP_PROXY to /etc/sudoers env_keep list, if you do 'sudo gem install'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants