rubygemsffi

bundle install is not successful cannot install ffi 1.9.9 osx 10.9


bundle install  
Fetching gem metadata from https://rubygems.org/...........  
Fetching gem metadata from https://rubygems.org/..  
Resolving dependencies...  
Enter your password to install the bundled RubyGems to your system:   
Using addressable (2.3.8)   
Using sass (3.4.15)   
Using sassy-maps (0.4.0)   
Using breakpoint (2.5.0)   
Using chunky_png (1.3.4)   
Using coderay (1.1.0)   
Using multi_json (1.11.1)   
Using compass-core (1.0.3)   
Using compass-import-once (1.0.5)   
Using rb-fsevent (0.9.5)   
Installing ffi (1.9.9)   
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

Gem files will remain installed in /Users/Moe/.bundler/tmp/8353/gems/ffi-1.9.9 for inspection.
Results logged to /Users/Moe/.bundler/tmp/8353/gems/ffi-1.9.9/ext/ffi_c/gem_make.out

An error occurred while installing ffi (1.9.9), and Bundler cannot continue. Make sure that gem install ffi -v '1.9.9' succeeds before bundling.


Solution

  • Thanks God, I was able to solve the problem,,,

    Turned out to be that one of the requirements is to have the "Command Line Tools" already installed on the system [using: Mac OSX 10.9] I was counting on that I already have "Xcode" installed, thats why I thought that "Command Line Tools" is bundled and installed with Xcode and it was but I just needed to configure "Xcode" properly....by doing the following:

    1.start "Xcode"....

    2.Go to "Preferences"

    3.Select "Locations" tab

    4.Command Line Tools: = select the version of "Xcode" that is already installed on the system. [Drop down menu]

    5.Relaunch "Terminal"

    6.Clear "Drush" cache

        drush cc drush
    

    7.Run:

        gem install ffi -v '1.9.9'
    

    and it was successful.

        bundle install
    

    success also.

    Please note: that I also did reinstall:

    RVM:

        \curl -sSL https://get.rvm.io | bash -s stable
    

    Bundler 1.10.5:

        gem install bundler 
    

    Hope this would help.