Why can't I install Ruby 1.9.2 on Mac OSX Lion?

I try to install Ruby 1.9.2 on a brand new MacBook Air with OSX Lion (10.7.2), and I continue to receive an error message during the installation process. I'm new to Ruby and starting with the Ruby on Rails 3 Tutorial, so I downloaded RVM and then ran the command "$ rvm install 1.9.2". and this is what happened:

Installing Ruby from source to: /Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 ruby-1.9.2-p290 - #fetching ruby-1.9.2-p290 - #extracted to /Users/richardberger/.rvm/src/ruby-1.9.2-p290 Fetching yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/src Configuring yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running ' ./configure --prefix="/Users/richardberger/.rvm/usr" ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/configure.log Compiling yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running 'make ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.log Installing yaml to /Users/richardberger/.rvm/usr ERROR: Error running 'make install', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log ruby-1.9.2-p290 - #configuring ERROR: Error running ' ./configure --prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/richardberger/.rvm/usr ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/configure.log ERROR: There has been an error while running configure. Halting the installation. 

Any help or alternative solutions is appreciated. And since I'm new to this, let me know if I need to provide more information.

Thanks!

UPDATE: here is the information from the configuration log:

 [2011-10-13 11:26:35] ./configure --prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/richardberger/.rvm/usr configure: WARNING: unrecognized options: --with-libyaml-dir checking build system type... i386-apple-darwin11.2.0 checking host system type... i386-apple-darwin11.2.0 checking target system type... i386-apple-darwin11.2.0 checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/Users/richardberger/.rvm/src/ruby-1.9.2-p290': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details 

Does this mean that I need to load the C compiler (e.g. Xcode?)

UPDATE (2): The problem is solved by downloading Xcode!

+4
source share
1 answer

error: no acceptable C compiler found in $ PATH

well, you don't have the Xtools developer kit installed on your Mac! for example there is no C compiler ...

you must put the DVD or Flash Drive that came with your computer into this OS X and install Xtools , and then try installing Ruby again.

+3
source

All Articles