2

I cannot install ruby properly using RVM..

The error says:

No binary rubies available for: downloads/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/xiruki/.rvm/archives
Extracting yaml to /Users/xiruki/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/xiruki/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/xiruki/.rvm/usr', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/xiruki/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/xiruki/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/xiruki/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/xiruki/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/xiruki/.rvm/usr', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.

What could be the problem? Please bear with me because I am new to MAC.

I am trying to install ruby 1.9.3

But it sticks to ruby 1.8.7 after i installed RVM via curl command.

whenever i try to install ruby 1.9.3 using rvm install command... it keeps on displaying errors.

xirukitepe
  • 1,575
  • 7
  • 26
  • 54
  • part of the text is `please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/configure.log` did you miss that? can you add this file? – mpapis Dec 23 '12 at 17:39
  • One thing you may find as you resolve this is that you have a 'system' ruby of 1.8.7 but a ruby version with RVM of 1.9.3 and you just make sure your RVM uses the 1.9.3 and it is the default. – Michael Durrant Dec 24 '12 at 02:17

2 Answers2

4

Do the following:

I too recommend you make sure to read rvm requirements but here's the gist of it for your convenience.

Upgrade to the latest Xcode, launch it, go to Preferences -> Downloads -> click "Install" for "Command Line Tools".

Install homebrew if you don't already have it. Then:

brew update
brew upgrade
brew install git

If you need to install rubies older than 1.9.3 do the following:

brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl

At this point you should rvm reinstall all of your rubies so they're compiled against all of your new stuff. Be sure to then run rvm use [RUBY] --default to use that ruby and make it the default one.

Remear
  • 1,927
  • 12
  • 19
  • 1
    This is what I do. Also I do `brew doctor` after brew install to see what it recommends. – Michael Durrant Dec 24 '12 at 02:16
  • Agreed. Definitely do ```brew doctor``` and resolve any issues it finds. – Remear Dec 24 '12 at 02:17
  • Thank you so much. Everything's working fine now. I also just followed the accepted answer in this question: http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools after installing XCODE on my mac. – xirukitepe Dec 27 '12 at 06:53
0

You need a compiler. Xcode command line tools or gcc. You probably have homebrew installed. I recommend you run brew doctor and follow the instructions.

You also must add a line to your bash file. This commands does that for you:

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile

After that you should be good.


UPDATE:

Instead of installing Xcode see what this command tells your to do: rvm requirements

I don't use rvm at the moment but it seems your will be better with gcc wich that command tells you to install.

Community
  • 1
  • 1
Ismael Abreu
  • 16,443
  • 6
  • 61
  • 75
  • It says `Warning: Experimental support for using Xcode without the "Command Line Tools". You have only installed Xcode. If stuff is not building, try installing the "Command Line Tools for Xcode" package provided by Apple. Warning: No developer tools installed You should install the Command Line Tools: http://connect.apple.com You must: brew install git You must: brew install git You must: brew install git Warning: An outdated version of Git was detected in your PATH. Git 1.6.6 or newer is required to perform checkouts over HTTP from GitHub. Please upgrade: brew upgrade git` – xirukitepe Dec 23 '12 at 18:12
  • I think i must download xcode first with command line tools. Is there any way to get the gcc something? THANKS btw – xirukitepe Dec 23 '12 at 18:13