Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Installing Ruby 1.9.3 w/ RVM on Mac OSX Lion

Adam Berlin
Friday, January 13, 2012
  • Ruby 1.9.3
  • RVM 1.10.0
  • Mac OSX 10.7.2
  • XCode 4.2

Our team ran into an issue installing Ruby 1.9.3 on Lion today. When running…

$ rvm install ruby-1.9.3

… the installer fails with an error message including “checking whether the C compiler works… no” even though we had XCode and gcc installed.

After some reading on StackOverflow and Github I found this solution [1]…

$ rvm install 1.9.3-p0 --with-gcc=clang

… which points an explanation on RVM’s issue tracker [2].

  1. http://stackoverflow.com/questions/8675194/error-installing-1-9-3-with-rvm-on-lion
  2. https://github.com/wayneeseguin/rvm/issues/534

See our full command line history and error messages below:

$ rvm install ruby-1.9.3-p0
Installing Ruby from source to:     /Users/foobar/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)...

ruby-1.9.3-p0 - #fetching
ruby-1.9.3-p0 - #extracted to /Users/foobar/.rvm/src/ruby-1.9.3-p0 (already extracted)
Fetching yaml-0.1.4.tar.gz to /Users/foobar/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/foobar/.rvm/src
Configuring yaml in /Users/foobar/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/foobar/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/foobar/.rvm/usr
ruby-1.9.3-p0 - #configuring
ERROR: Error running ' ./configure -- prefix=/Users/foobar/.rvm/rubies/ruby-1.9.3-p0 --enable- shared --disable-install-doc --with-libyaml- dir=/Users/foobar/.rvm/usr ', please read  /Users/foobar/.rvm/log/ruby-1.9.3-p0/configure.log
ERROR: There has been an error while running configure.  Halting the installation.

$ cat /Users/foobar/.rvm/log/ruby-1.9.3-p0/configure.log
[2012-01-13 10:31:49]  ./configure -- prefix=/Users/foobar/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml- dir=/Users/foobar/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml-dir
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking target system type... x86_64-apple-darwin11.2.0
checking whether the C compiler works... no
configure: error: in `/Users/foobar/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables
See `config.log' for more details
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

2 Comments

  1. Scott Windsor says:

    Ran into the same issue recently :)

    Try installing readline & yaml via rvm first and giving it another whirl…

    rvm pkg install libyaml
    rvm pkg install readline

    rvm install 1.9.3 –with-gcc=clang –with-readline-dir=/Users/scott/.rvm/usr –with-libyaml-dir=/Users/scott/.rvm/usr

    January 13, 2012 at 8:27 am

  2. ALA says:

    1. Uninstall/remove all traces of manually installed old ruby versions and extras (e.g. sqlite3, libxml2-x.x.x, libxslt-x.x.x) from your /usr/local/ or wherever you installed them.
    2. Download and install JewlryBox http://unfiniti.com/software/mac/jewelrybox which is a RVM GUI interface for managing your rubies and gemsets.
    3. In JewlryBox, click “Add Ruby” and choose the version of ruby you want to install (I chose 64 bit, Enabled Shared and didn’t check/tick the “Use clang” option).

    Worked with OS X Lion 10.7.3 and Xcode 4.3 Command Line Tools installed.

    February 27, 2012 at 1:40 pm

Add New Comment Cancel reply

Your email address will not be published.

Adam Berlin

Adam Berlin
New York

Recent Posts

  • NYC Standup – February 27th, 2012
  • Don't Sweep It Under the Rug
Subscribe to Adam's Feed

Author Topics

  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >