RVM - MacPorts will not be updated through a proxy server

I am trying to use RVM to install ruby ​​on my iMac.

I'll start by entering the following:

rvm list known 

Then I focus on the version I want to install (a manual that I follow recommendations 1.9.2 instead of base 1.8.7) with the following line:

 rvm install 1.9.2 

Then I get the following:

 27698AM:~ butler15$ rvm install 1.9.2 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.7/x86_64/ruby-1.9.2-p320. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Installing requirements for osx, might require sudo password. Password: 

I enter my password and I get the following:

 DEBUG: Copying /Users/butler15/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs ---> Updating MacPorts base sources using rsync rsync: failed to connect to rsync.macports.org: Operation timed out (60) rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9] Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs Exit code: 10 DEBUG: Error synchronizing MacPorts sources: command execution failed while executing "macports::selfupdate [array get global_options] base_updated" Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed 

If I understand correctly that he is trying to update MacPorts, but fails due to a proxy (or something?)

I tried following this guide, but it didn't work: http://samkhan13.wordpress.com/2012/06/15/make-macports-work-behind-proxy/

Additional Information:

My current version is RVM and RUBY: http://d.pr/i/H1Eu

My OSX - 10.7.4

Thanks in advance for your help :)

+4
ruby terminal osx-lion rvm
May 13 '13 at 11:25
source share
4 answers

While Koji's comment forces RVM to work behind the proxy server, Macports will need to be updated to automatically work behind the proxy server.

First install macports from the package at http://www.macports.org/install.php

Then run the following commands:

 sudo mkdir -p /opt/local/var/macports/sources/svn.macports.org/trunk/dports/ cd /opt/local/var/macports/sources/svn.macports.org/trunk/dports/ sudo svn co http://svn.macports.org/repository/macports/trunk/dports/ . 

In / opt / local / etc / macports / sources.conf comment

 rsync://rsync.macports.org/release/tarballs/ports.tar [default] 

with your favorite editor, and then add this right below this line.

 file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/ [default] 

And then run these commands so that it updates and does not complain that your ports are not indexed.

 sudo port -d sync sudo portindex 

Then change .rvm / scripts / functions / requirements / osx_port by changing selfupdate to sync in the requirements_osx_port_update_system() function.

 requirements_osx_port_update_system() { #__rvm_try_sudo port -dv selfupdate || return $? __rvm_try_sudo port -dv sync || return $? } 
+7
Jul 19 '13 at 15:33
source share

If you are trying MAKE MACPORTS WORK BEHIND PROXY , how about avoiding port selfupdate ?

  $ diff -u .rvm / scripts / functions / requirements / osx_port.org .rvm / scripts / functions / requirements / osx_port
 --- .rvm / scripts / functions / requirements / osx_port.org 2013-05-28 16: 58: 37.000000000 +0900
 +++ .rvm / scripts / functions / requirements / osx_port 2013-05-28 16: 58: 50.000000000 +0900
 @@ -82.7 +82.7 @@

  requirements_osx_port_update_system ()
  {
 - __rvm_try_sudo port -dv selfupdate ||  return $?
 + __rvm_try_sudo port -dv sync ||  return $?
  }

  requirements_osx_port_define () 

In my case, it works great.

+3
May 28 '13 at 8:22
source share

run "__rvm_try_sudo port -dv selfupdate" in the terminal and enter the password from the keyboard then re-run the script to install ruby

It works on my laptop.

Good luck.

+1
Oct 02 '13 at
source share

First you need to (re) install the command line tools:

 sudo xcode-select --install 

then update macports:

 sudo port -v selfupdate 

Source: stack overflow

Then you may be missing some requirements, namely:

 sudo rvm requirements 
0
Nov 03 '13 at 16:30
source share



All Articles