carlhuda/bundler — Issue #1540: Fatal error installing mysql (2.8.1) gem on Ruby 1.8.7-p352
Author: usaalv
Created: 2011-11-16 19:26:59+00:00
State: open

When I run a bundle install via the following command

/Users/aldovalenti/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/aldovalenti/.rvm/gems/ruby-1.8.7-p352/bin/bundle install

I get the error

Installing mysql (2.8.1) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/Users/aldovalenti/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/installer.rb:552:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

If I run

gem install mysql -v 2.8.1

I get

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

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

Gem files will remain installed in /Users/aldovalenti/.rvm/gems/ruby-1.8.7-p352/gems/mysql-2.8.1 for inspection.
Results logged to /Users/aldovalenti/.rvm/gems/ruby-1.8.7-p352/gems/mysql-2.8.1/ext/mysql_api/gem_make.out