简体   繁体   中英

Installing ruby with rvm fails on ubuntu 10.10

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: (22) 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. ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM