如何在Mac OS 10.6上安装mysql gem? [英] How to install mysql gem on Mac os 10.6?
问题描述
我刚刚在此iMac和rubygems上安装了MAMP,但是当我运行时:
i just installed MAMP on this iMac and the rubygems but when i run:
sudo gem install mysql-–with-mysql-config =/usr/local/mysql/bin/mysql_config
sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
给我
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 mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
/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 /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 ERROR: could not find gem — locally or in a repository ERROR: could not find gem –with-mysql-config=/usr/local/mysql/bin/mysql_config locally or in a repository
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 ERROR: could not find gem — locally or in a repository ERROR: could not find gem –with-mysql-config=/usr/local/mysql/bin/mysql_config locally or in a repository
我如何安装此gem?
推荐答案
我发现了这一点,并得出了完美的解决方案:
I found this and worked out perfectly:
您可以转到> http://www.tmtm.org/en/ruby/mysql/下载tar 文件,然后运行下面的命令
you can go to http://www.tmtm.org/en/ruby/mysql/ to download the tar file, and run the command below
# ruby ./install.rb
安装mysql.rb
to install the mysql.rb
这篇关于如何在Mac OS 10.6上安装mysql gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!