创建ruby db时,懒惰符号绑定失败 [英] Lazy symbol binding failed when creating ruby db
问题描述
我试图在rails上安装ruby,一切都安装到目前为止,但是当我尝试创建一个数据库 rake db:create
,我得到一个奇怪的错误:
I am trying to install ruby on rails, and everything is installed now so far, but when I try to create a database with rake db:create
, I get a weird error:
dyld:延迟符号绑定失败:符号未找到:_mysql_get_client_info
引用自:/ Library / Ruby / Gems /1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
预期在:flat namespace
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected in: flat namespace
dyld:找不到符号:_mysql_get_client_info
引用自:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
预期在:flat namespace
dyld: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected in: flat namespace
跟踪/ BPT陷阱:5
Trace/BPT trap: 5
我正在对osx mountain lion进行更新。
I am working on osx mountain lion latest update. Does anyone have the right solution for me?
推荐答案
您可以试试这个。
sudo gem install mysql2 — –with-mysql-config=/usr/local/mysql/bin/mysql_config
请务必使用您的位置修改mysql配置路径。
Be sure to modify the mysql config path with the location for yours.
命令。
locate mysql_config
利用上面的命令给出的路径。
Leverage the path given with the command above.
这篇关于创建ruby db时,懒惰符号绑定失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!