2011-07-02 120 views
0

收到以下錯誤無法啓動服務器Ruby on Rails的

/Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) 
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle 
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle 
from /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2.rb:9 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require' 
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler.rb:120:in `require' 
from /Users/mehtaameet/Sites/simple_cms/config/application.rb:7 
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28:in  `require' 
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28 
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27:in `tap' 
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27 
from script/rails:6:in `require' 
from script/rails:6 
+0

您正在使用哪種操作系統? – Dex

+0

看起來像Mac OS,根據上述跟蹤中的位判斷libmysqlclient.18.dylib無法加載。 – buruzaemon

+0

操作系統將是Mac OS。 「/ Library」是Mac OS上的標準基本目錄,在Linux上它將是小寫字母。 –

回答

0

這裏是你的堆棧跟蹤線索:

Library not loaded: libmysqlclient.18.dylib (LoadError) 

你需要確保這個的SqlClient庫on your load path

0

我只是做了一個捆綁安裝,它的工作! -