gpt4 book ai didi

ruby-on-rails - 如何在 Mac os 10.6 上安装 mysql gem?

转载 作者:数据小太阳 更新时间:2023-10-29 08:15:02 25 4
gpt4 key购买 nike

我刚刚在这个 iMac 和 ruby​​gems 上安装了 MAMP,但是当我运行时:

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.<p></p>

<p>/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</p>

<p>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
</p>

我如何安装这个 gem?

最佳答案

我找到了这个并且完美地解决了:

你可以去http://www.tmtm.org/en/ruby/mysql/下载 tar文件,然后运行下面的命令

#ruby./install.rb

安装mysql.rb

关于ruby-on-rails - 如何在 Mac os 10.6 上安装 mysql gem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2716527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com