我想將mysql添加到我的Gemfile並在運行bundle安裝時進行安裝。我收到以下錯誤。嘗試在os上安裝mysql gem時出錯x
Installing mysql (2.8.1) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/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 mysql之前運行sudo。關於如何解決問題的任何想法都會很棒。
感謝, 馬修
http://stackoverflow.com/questions/41134/how-do-i-install-the-mysql-ruby-gem-under-os-x-10-5-4 – Mark 2011-01-12 15:32:56