Search code examples
rubyinstallationosx-mountain-lion

Ruby compile failed while installing on Mountain Lion 10.8?


This is the command I entered in the terminal while following "Ruby on Rails development with Mac OS X Mountain Lion", and its result:

rbenv install 2.0.0-p247

Downloading openssl-1.0.1e.tar.gz...
    -> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
    Installing openssl-1.0.1e...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/x8/19f_wwjx4gd26z6qdq874tj40000gs/T/ruby-build.20130919211135.42003
    Results logged to /var/folders/x8/19f_wwjx4gd26z6qdq874tj40000gs/T/ruby-    build.20130919211135.42003.log

    Last 10 log lines:
    RANLIB        =true
    ARFLAGS       =
    PERL          =/usr/bin/perl
    SIXTY_FOUR_BIT_LONG mode
    DES_UNROLL used
    DES_INT used
    RC4 uses uchar
    RC4_CHUNK is unsigned long
    sh: make: command not found
    /usr/local/bin/ruby-build: line 387: make: command not found

Please help!


Solution

  • /usr/local/bin/ruby-build: line 387: make: command not found means rbenv can't compile Ruby because the necessary tools aren't available.

    1. Have you installed Xcode?
    2. Have you installed its associated command-line applications? That's the second step needed, and is found inside the Xcode application.
    3. Have you recently updated Xcode? If so, you might need to update the command-line tools too.