我已經有很長一段時間了rails的問題,我嘗試了很多我在這裏找到的類似問題的答案但雖然其中一些有效的一些錯誤,我一直堅持,並不能解決這個問題,我嘗試了大多數解決方案,我發現了類似的問題,最後決定問自己,這個錯誤只發生在爲這個特定的項目啓動服務器時,而在服務器上爲一個新的空軌項目正常啓動:圖書館沒有加載:/usr/local/mysql/lib/libmysqlclient.18.dylib(LoadError)
$ rails server
/Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': dlopen(/Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: no suitable image found. Did find:
/usr/local/mysql/lib/libmysqlclient.18.dylib: mach-o, but wrong architecture
/usr/local/mysql/lib/libmysqlclient.18.dylib: mach-o, but wrong architecture
/usr/lib/libmysqlclient.18.dylib: mach-o, but wrong architecture - /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
from /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `block in require'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
from /Users/celorisoli/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
from /Users/celorisoli/logbook/config/application.rb:7:in `<top (required)>'
from /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `require'
from /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from /Users/celorisoli/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
大多數的回答可以幫助各國「沒有找到圖片」問題,但在這裏的錯誤是:
Reason: no suitable image found. Did find:
http://www.blog.bridgeutopiaweb.com/post/how-to-fix-mysql-load-issues-on-mac-os-x/有幫助嗎? – PiLHA
我已嘗試之前它返回的鏈接install_name的兩個實例: install_name_tool:無法打開文件:在/ usr/local/bin目錄/搜索(沒有這樣的文件或目錄) 或 install_name_tool :無法打開文件:/ usr/local/bin/indexer(沒有這樣的文件或目錄) –
現在鏈接http://c.kat.pe/post/how-to-fix-mysql-load-issues- on-mac-os-x/...我建議通過自制軟件安裝MySQL。 – kgpdeveloper