开发者

Installing ruby with rvm fails on ubuntu 10.10

开发者 https://www.devze.com 2023-04-11 17:58 出处:网络
I have been trying to install ruby 1.9.2 using rvm but I\'m unable to get it to work.. I am behind a proxy, but I have configured both http_proxy and https_proxy.

I have been trying to install ruby 1.9.2 using rvm but I'm unable to get it to work..

I am behind a proxy, but I have configured both http_proxy and https_proxy.

Output:

ta@ci:~$ rvm install 1.9.2-p136
Installing Ruby from source to: /home/ta/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...

ruby-1.9.2-p136 - #fetching 
ruby-1.9.2-p136 - #downloading ruby-1.9.2-p136, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
curl: (22) The requested URL returned error: 407
ERROR: The requested url does not exist: 'https://rvm.beginrescueend.com/src/ruby-1.9.2-p136.tar.bz2'
Trying http:// URL instead.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (2开发者_JAVA百科2) The requested URL returned error: 407
ERROR: There was an error, please check /home/ta/.rvm/log/ruby-1.9.2-p136/*.log
ERROR: There has been an error while trying to fetch the source.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.


Eventually I managed to get it to work this way as well. Using the .curlrc is also a good idea, but I don't like storing my password as plain text on the machine.

rvm install 1.9.2-p136 --proxy http://username:password@domain:port


I think you can put these lines in your ~/.curlrc file:

proxy-user = "username:password"
proxy = "http://proxy.domain.com:8080"

I got this from the curl manual page, which can be found online here.

Quote:

.. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. ..

.. Long option names can optionally be given in the config file without the initial double dashes. ..

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号