I'm trying to run "bundle update" on OS X 10.9 but it's failing with the following error message:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for ruby/util.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:14:in `<main>'
Gem files will remain installed in /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0 for inspection.
Results logged to /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0/ext/mri/gem_make.out
An error occurred while installing bcrypt-ruby (3.1.0), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.1.0'` succeeds before bundling.
Xcode 5 (Preview 3) has been installed and so are the command line tools. Here is some relevant info:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.1.61) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
brew update
Already up-to-date.
rvm requirements
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
I'm not having any issues installing any version of Ruby so far (using rvm). Does anyone have any idea?
Thanks,
Francis
Make sure your default ruby is 1.9.3-p448. rvm --default use 1.9.3-p448
For me the issue was resolved by installing xcode command line tools. In terminal run:
xcode-select --install
and then select install in the popup.
I had recently installed xcode 5 and I guess I needed to run the above command after the install and I didn't and somehow that caused bundle update to fail.
I had the same issue , the problem was when upgrading to OSX 10.9 (mavericks) I didn't confirm that I agreed to the license agreement for Xcode . if you type the following
gcc --version
you should get "You have not agreed to the Xcode license agreements."
once agreed everything worked fine
Related
I use Flutter with Android Studio on a Mac.
One day (today), I ran "flutter doctor" from the command line.
It stated that my "cocoapods" was not good enough.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS
! CocoaPods 1.8.4 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
[✓] Connected device (1 available)
It suggested clicking on this link for instructions on what to do.
The instructions said to run this command on the command line:
sudo gem install cocoapods
So I ran that command but it had an error:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210311-2675-ybimov.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-system-libffi
--disable-system-libffi
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:10:in `system_libffi_usable?'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.15.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.15.0/gem_make.out
I tried reinstalling completely according to the troubleshooting guide like this:
sudo gem uninstall cocoapods
sudo gem install cocoapods
I am not a C programmer or a systems analyst... just trying to learn Flutter.
What is the error-free command to update cocoapods?
You could try:
brew install cocoapods
I got the "Warning: CocoaPods recommended version 1.10.0 or greater not installed." warning after upgrading to Flutter 2.
In my case, brew install cocoapods failed for me.
What did work was $ sudo gem install cocoapods as noted in the CocoaPods Guide and suggested by flutter doctor
Thank you sftom, that was the basic answer and a major step in the right direction.
In my particular case, the entire process was:
brew upgrade <br>
brew install cocoapods
and, since I got the following error during the above step:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/xcodeproj
Target /usr/local/bin/xcodeproj
already exists. You may want to remove it:
rm '/usr/local/bin/xcodeproj'
brew link --overwrite cocoapods
I think I got error exactly same with you.
In my case, I tried all of thing I found and failed.
After fighting 2 hours with my Mac
I finally succeeded with these two commands:
First, this command update my something. (probably ruby 2.6 to 2.7)
$ sudo gem update --system
And then, this command which I typed in maybe one hundred times before.
$ sudo gem install cocoapods
This way, I got cocoapods 1.10.2
Recently I've updated my Mac to El Capitan and re-installed (with Homebrew) ImageMagick 6.9.2-7
Unfortunately bundle install doesn't work because RMagick fails to build.
Here the stack trace:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/me/.rvm/rubies/ruby-1.9.3-p327/bin/ruby -r ./siteconf20151204-39308-uw4m6y.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/local/opt/gcc46/bin/gcc-4.6... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/me/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
/Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/me/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:194:in `<main>'
extconf failed, exit code 1
I've tried several different solutions founded on Internet but nothing seems to fix this error.
With the operations below I receive always the errore above:
1) C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.9.2-7/include/ImageMagick-6/ gem install rmagick -v '2.13.2'
2) gem install rmagick --version=2.13.2 --platform=ruby -- --with-opt-lib="h:/ImageMagick-6.9.2-7/lib" --with-opt-include="h:/ImageMagick-6.9.2-7/include"
3) $ cd /usr/local/Cellar/imagemagick/6.9.2-7/lib
$ ln -s libMagick++-Q16.6.dylib libMagick++.dylib
$ ln -s libMagickCore-Q16.2.dylib libMagickCore.dylib
$ ln -s libMagickWand-Q16.2.dylib libMagickWand.dylib
The error still the same:
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
I've also updated xcoce to 7.1.1
I'm using ruby-1.9.3-p327 with RVM
Thanks in advance.
You need to update Xcode and install Command Line Tools (xcode-select --install).
None of these worked in isolation for me, but the running of all of them seemed to do the trick:
xcode-select --install
brew unlink imagemagick
brew uninstall --force imagemagick
brew update
brew doctor
brew install imagemagick
That's likely overkill but in the end worked for me.
While trying to do "bundle install", I receive error message below
environment = OSX 10.9.4, rbenv 0.4.0,
ruby 2.1.2,
Homebrew 0.9.5
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/hirotakagotanda/.rbenv/versions/2.1.2/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/hirotakagotanda/.rbenv/versions/2.1.2/bin/ruby
/Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory # rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-1.6.6 for inspection.
Results logged to /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.6/gem_make.out
An error occurred while installing debugger (1.6.6), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.6'` succeeds before bundling.
Could anyone please provide me solution, I have been misfortunate to find out any...
This is likely a problem with the Xcode Command Line Tools. There are a number of steps needed to get this right.
This question Installing Ruby Debug IDE Gem provides one example.
I ran into the same issue and solved it by agreeing to xcode's license (it seems to happen after an update and you haven't yet agreed to the update)
Just run xcodebuild -license from the command line
Found the answer thanks to this question
Neither of the above comments helped me. Changing to ruby 2.1.1 of below allowed me to bundle without issue.
rbenv local 2.1.1
bundle install
using ruby 2.1.2, it breaks in the same place
I have a remote linux server, it does not have internet and its behind firewall. Its does not have gcc compiler. So I cant install or compile .
The linux server has got the rvm installed with ruby 1.9.3
Usually , I would install the gem on my local Mac OSX and then copy the gems to the linux server i.e ( xxxx.gem file from cache directory and xxx folder from gem directory of the ruby). So far it has been working fine. As part of the new test, I installed sqlite3 gem and copied its .gem file to the linux server and did a gem install sqlite on the linux server. It did work and got the below error
gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
/ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /ngs/app/athenat/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
from extconf.rb:34:in `<main>'
Gem files will remain installed in /ngs/app/athenat/.rvm/gems/ruby-1.9.3-p374#11.4.0-1/gems/sqlite3-1.3.8 for inspection.
Results logged to /ngs/app/athenat/.rvm/gems/ruby-1.9.3-p374#11.4.0-1/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
I googled and saw many have suggested to install apt-get install libsqlite3-dev. I can't do this on my remote linux server.
Can anyone please suggest how to resolve this.
I followed few of the suggestion posted in the below post but it did not work.
Problem installing sqlite3-ruby!
sqlite3 gem fails to install
Not having a compiler is going to make this sort of thing nearly impossible.
You can't just compile for OS X and sling those binaries over to Linux. They're not the same format.
You may be able to create an environment compatible with your Linux target using a virtual environment in VMWare Fusion or VirtualBox, such as when using Vagrant, to compile for your target OS and architecture and them ship those binaries over. This is usually a last resort, as you will have to link against exactly the same libraries you have available on the remote system. To do this correctly could take a lot of time.
I searched for this issue and kept finding resources related to a PC.
Every time I try to install EventMachine I get this error:
Building native extensions. This
could take a while... ERROR: Error
installing eventmachine: ERROR:
Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for rb_trap_immediate in
ruby.h,rubysig.h... *** extconf.rb
failed *** Could not create Makefile
due to some reason, probably lack of
necessary libraries and/or headers.
Check the mkmf.log file for more
details. You may need configuration
options.
Provided configuration options:
--with-opt-dir --without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog --without-make-prog
--srcdir=. --curdir
--ruby=/usr/local/bin/ruby
/usr/local/lib/ruby/1.9.1/mkmf.rb:368:in
`try_do': The complier failed to
generate an executable file.
(RuntimeError) You have to install
development tools first. from
/usr/local/lib/ruby/1.9.1/mkmf.rb:446:in
`try_compile' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:568:in
`try_var' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:816:in
`block in have_var' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:693:in
`block in checking_for' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:280:in
`block (2 levels) in postpone' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:254:in
`open' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:280:in
`block in postpone' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:254:in
`open' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:276:in
`postpone' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:692:in
`checking_for' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:815:in
`have_var' from extconf.rb:16:in
`<main>'
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10
for inspection. Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
It seems to break while building C extensions. I've tried various solutions like "Mac OS X Leopard installing the ruby gem eventmachine" but had no luck.
You will need to have XCode 3.2 or 4 installed in order for extensions like this to compile. The XCode package is an optional install and comes on either the main install DVD for a retail package of the OS or as a supplemental disc with a new system.
You can download it from the App Store for 10.7 or later.
Your problem might be because you haven't installed the Developer Tools for Xcode 4.2/4.3.
With Xcode 4.2.x and 4.3.x, you need to install the command-line tools separately by:
Launching Xcode, then opening the "Preferences" menu from the "Xcode" menu on the menu bar.
Select the "Downloads" tab (icon).
Click the "Install" button for "Command Line Tools".
If correctly installed, then running cc --version should output:
% cc --version
Apple clang version 3.1 (tags/Apple/clang-318.0.54) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
Or if you are using Ruby 1.9.3, there are known issues with EventMachine. See http://isitruby19.com/eventmachine. I suggest you downgrade to 1.9.2 for projects needing EventMachine using RVM or rbenv.
The solution here worked for me. I just had to install command line tools from https://developer.apple.com/downloads/index.action
See "getting eventmachine gem to compile on OSX Lion 10.8.2 with xcode 4.5.1" for more information.
I had the same problem. Opening up the mkmf.log file and running the command narrowed down the problem to the gmp library. The gmp library was in a different directory and LD_LIBRARY_PATH was not set.
I set LD_LIBRARY_PATH to the location gmp was in and then it installed properly.