Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble installing Ruby 2.0.0-p247 via RVM (OSX Mountain Lion)

My ultimate goal is to install the current version of Ruby on Rails. I am running on OS X Mountain Lion. Here's my process so far:

Installed RVM

$ \curl -L https://get.rvm.io | bash -s stable

Checked for known (and I assume approved) installs

$ rvm list known

I see that the current stable build is available

[ruby-]2.0.0[-p247]

Key in command to install

$ rvm install 2.0.0-p247

Note: I also tried these install commands

$ rvm install ruby-2.0.0-p247
$ rvm install ruby=2.0.0-p247

I'm getting nowhere fast. Results:

$ rvm install 2.0.0-p247
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p247.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247, this may take a while depending on your cpu(s)...
ruby-2.0.0-p247 - #downloading ruby-2.0.0-p247, this may take a while depending on your connection...
ruby-2.0.0-p247 - #extracted to /Users/xxxxx/.rvm/src/ruby-2.0.0-p247 (already extracted)
ruby-2.0.0-p247 - #configuring........
Error running './configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/xxxxx/.rvm/log/ruby-2.0.0-p247/1375141206_configure.log
There has been an error while running configure. Halting the installation.

I also ran this command in debug mode. To avoid clutter, you can access it here.

Also, here is the log:

./configure
current path: /Users/xxxxx/.rvm/src/ruby-2.0.0-p247
command(7): ./configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking whether the C compiler works... no
configure: error: in `/Users/xxxxx/.rvm/src/ruby-2.0.0-p247':
configure: error: C compiler cannot create executables
See `config.log' for more details

This is my first installation via RVM. $rvm list returns no gems.

Please ask if any additional information might be helpful.

Edit - HERE is the log in case that might help anyone.

like image 374
MrCarder Avatar asked Jul 29 '13 23:07

MrCarder


2 Answers

Something must have been wrong with either my Xcode or my Command Line Tools install. Reinstalling both made everything run beautifully.

like image 94
MrCarder Avatar answered Oct 31 '22 10:10

MrCarder


For those that arrived here from google when you applied the same error as the query:

I got this same problem but did not want to go through the ridiculously long process of reinstalling xcode like the accepted answer suggested. All I did was run
rvm get stable And then run
rvm install ruby-2.0.0-p247 again

my original problem

problem

then after I ran
rvm get stable

Solution

like image 3
JGallardo Avatar answered Oct 31 '22 08:10

JGallardo