In an effort to install Dradis, I have been running into several issues installing Ruby 1.9.3, as required. The official Dradis Mac OS X install guide suggests running the following command to install Ruby 1.9.3 through RVM.
rvm install 1.9.3
However, with this command I have been receiving configuration errors that have not been allowing me to move forward.
johnpoulin$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/johnpoulin/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/johnpoulin/.rvm/src
Error running ‘tar xmzf /Users/johnpoulin/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/johnpoulin/.rvm/src ‘, please read /Users/johnpoulin/.rvm/log/ruby-1.9.3-p125/yaml/extract.log
Configuring yaml in /Users/johnpoulin/.rvm/src/yaml-0.1.4.
Error running ‘ ./configure –prefix=”/Users/johnpoulin/.rvm/usr” ‘, please read /Users/johnpoulin/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/johnpoulin/.rvm/src/yaml-0.1.4.
Error running ‘make ‘, please read /Users/johnpoulin/.rvm/log/ruby-1.9.3-p125/yaml/make.log
Database file /Users/johnpoulin/.rvm/config/packages does not exist.
Installing Ruby from source to: /Users/johnpoulin/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)…
ruby-1.9.3-p125 – #fetching
ruby-1.9.3-p125 – #extracted to /Users/johnpoulin/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 – #configuring
Error running ‘ ./configure –prefix=/Users/johnpoulin/.rvm/rubies/ruby-1.9.3-p125 –enable-shared –disable-install-doc –with-libyaml –with-opt-dir=/Users/johnpoulin/.rvm/usr ‘, please read /Users/johnpoulin/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
After Manual inspection of the failed configuration, it seemed that the culprit was a missing C compiler.
configure: WARNING: unrecognized options: --with-libyaml checking build system type... i386-apple-darwin11.3.0 checking host system type... i386-apple-darwin11.3.0 checking target system type... i386-apple-darwin11.3.0 checking whether the C compiler works... no configure: error: in `/Users/johnpoulin/.rvm/src/ruby-1.9.3-p125': configure: error: C compiler cannot create executables See `config.log' for more details dakota-marshall-2:ruby-1.9.3-p125 johnpoulin$ gcc -bash: gcc: command not found
./configure –prefix=/Users/johnpoulin/.rvm/rubies/ruby-1.9.3-p125 –enable-shared –disable-install-doc –with-libyaml –with-opt-dir=/Users/johnpoulin/.rvm/usr
Imagine my surprise, when I noticed that my Macbook of two years didn't have a C compiler. How has this never caused an issue before?
After doing a little research, it looks like a recent uninstall of Xcode may have removed GCC. To fix this problem I simply reinstalled the most recent version of Xcode (in this case 4.3.2), with hopes that GCC would be magically installed... No luck.
The solution required me to install the Command Line Tools component available through the Xcode download preference panel.
