rails服务器错误? (导轨3)
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2.rb:8
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler.rb:120:in `require'
from /Users/imran/simple_cms/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6
有谁知道我可以解决这个问题? 提前致谢 ;-)
现在我得到这个?
dyld:懒符号绑定失败:找不到符号:_mysql_get_client_info引用自:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
预计在:平面命名空间
dyld:找不到符号:_mysql_get_client_info引用自:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
预计在:平面命名空间
Trace / BPT陷阱
可能是这篇文章与您的问题类似:库未加载:尝试在OS X 10.6上运行'rails server'时出现libmysqlclient.16.dylib错误,并显示mysql2 gem
尝试这个:
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"
把它放在.profile(或.bashrc)中,然后输入这个命令
my_term>源.profile
用你的MySQL客户端安装位置替换'/ usr / local / mysql / lib /'
再次从安装程序更新MySQL(例如, mysql-5.5.10-osx10.6-x86_64
)。
然后MySQL2 gem: $ sudo gem install mysql2 -- --with-mysql-config=/usr/local/mysql-5.5.10-osx10.6-x86_64/bin/mysql_config
它为我工作。
链接地址: http://www.djcxy.com/p/33279.html