开发者

error when installing mysql ruby gem on OSX 10.6.3

So I am getting the same issue as mentioned here - gem install mysql failure in Snow Leopard

But I haven't been able to get it fixed using the answers on this link.

Here's a brief history -

  • I had MAMP on my machine,
  • but now I downloaded the latest MySQL from mysql.com and installed version 5.1.46
  • this new version runs fine and client "mysql" is able to connect
  • and I a开发者_如何学编程lso have XCode v3.2.1, since someone mentioned that it can cause issues.

Here's the error -

**Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
    ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config
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 /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out**


"can't find header files for ruby" usually means that the system can't locate the header files for Ruby. This happened to me when I upgraded to 10.6 from 10.5. Download the latest XCode from Apple's site and reinstall it. Make sure that you check the box for "UNIX Development" during the install. The header files for Ruby are not in the main package.

Have you installed other versions of Ruby or are you using the standard 1.8.7 that comes with OS X? You can check your version of ruby by typing ruby -v at a terminal prompt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜