Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update ruby version on MAC

I'm trying to update ma ruby version. I'm with ruby 1.8.7 and I would like to install 2.1.0. I just installed rvm, rbenv, brew and gem.

But when I try to do

$ rbenv install 2.1.0.

I get an error about clang. I don't get the point between clang and ruby

Could you please help me?

Error:

$ rbenv install 2.1.0
Downloading ruby-2.1.0.tar.gz...
Installing ruby-2.1.0...

BUILD FAILED
...
Last 10 log lines:
...
checking build system type... x86_64-apple-darwin12.3.0
checking host system type... x86_64-apple-darwin12.3.0
checking target system type... x86_64-apple-darwin12.3.0
checking for gcc-4.2... no
checking for clang... no
checking for gcc... no
checking for cc... no
./configure: line 3390: -E: command not found
configure: error: clang version 3.0 or later is required
like image 449
Medmax Avatar asked Jan 24 '14 00:01

Medmax


1 Answers

You need to install the Developer Tools command-line tools in order to build Ruby. As one option, you can install Xcode from the App Store, and Xcode will let you install the command line tools if they aren't automatically installed with your version.

like image 163
Chuck Avatar answered Sep 21 '22 06:09

Chuck