可能重複:
Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem耙分貝:遷移(MySQL的)
爲什麼我得到這個錯誤?什麼意思?
我已經安裝了mysql2寶石, 「sudo的創業板安裝mysql2」
的Gemfile:
gem 'mysql2'
〜:耙分貝:遷移--trace
rake aborted!
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
/Users/leonardo/dev/myproject/config/application.rb:7
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Users/leonardo/dev/myproject/Rakefile:5
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
已解決:http://stackoverflow.com/a/6100648/1028100 謝謝你!現在你可以關閉這個問題 – sparkle