Skip to content

Instantly share code, notes, and snippets.

@bricker
Last active August 29, 2015 14:04
Show Gist options
  • Save bricker/246083e9f941c8586864 to your computer and use it in GitHub Desktop.
Save bricker/246083e9f941c8586864 to your computer and use it in GitHub Desktop.
gem install mysql2
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/bricker/.rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for ruby/thread.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/bricker/.rubies/ruby-2.1.1/bin/ruby
/Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/bricker/.rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header'
from extconf.rb:9:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/bricker/.gem/ruby/2.1.1/gems/mysql2-0.3.16 for inspection.
Results logged to /Users/bricker/.gem/ruby/2.1.1/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.16/gem_make.out
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment