Final編輯:我玩了幾個不同的文件,出現了一些錯誤,然後從頭開始重新安裝rvm和其他一切,發現了一些修復程序並對它們進行了編輯,最後一切正常。謝謝大家的幫助MySQL和Rails服務器問題
編輯:我注意到,它說,圖書館沒有裝載:/usr/local/mysql-5.5.10-osx10.6-x86_64/lib/libmysqlclient.18.dylib(LoadError)
但我有MySQL 5.5.11,我該如何解決?
我簡直已經尋找了近3個小時,但沒有發現任何工作時,我要麼嘗試啓動服務器或生成一個模型發生
同樣的錯誤
我有捆綁和mysql2寶石。
助洗劑(2.1.2) 捆綁(1.0.12) erubis(2.6.6) I18N(0.5.0) 郵件(2.2.17) MIME類型(1.16) mysql2(0.2。 7)
我得到以下輸出:
hrs772:demo kishinmanglani$ rails s
/Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.7/lib/mysql2.rb:8:in `require': dlopen(/Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql-5.5.10-osx10.6-x86_64/lib/libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.7/lib/mysql2.rb:8:in `<top (required)>'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `each'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `block in require'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `each'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `require'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler.rb:120:in `require'
from /Users/kishinmanglani/rails_projects/demo/config/application.rb:7:in `<top (required)>'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:28:in `block in <top (required)>'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
from /Users/kishinmanglani/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
以野生刺here..have您嘗試使用另一個MySQL寶石?我所知道的是'mysql',''mysql2'和'mysql-ruby'。 – pthesis 2011-04-21 05:06:37
我還沒有,但我寧願用mysql2 gem解決問題,而不是隻切換到mysql或mysql-ruby gems – mergesort 2011-04-21 05:23:19