可能重複:
In my rails 3 app, simple_captcha doesn't display image on production mode安裝mysql2寶石錯誤
我通過macport但創業板名單安裝Ruby和Ruby寶石不包括mysql2。那麼我怎麼會得到安裝在我的寶石列表裏面的「/ opt/local/bin/gem」中的mysql2 gem
另外,什麼是mysql2 gem?我有MySQL的寶石,只想使用MySQL,不確定是什麼意思的MySQL2。當我嘗試在應用上啓動webrick時,它會給我一個mysql2錯誤。
感謝
更新: 我RAM sudo的創業板安裝mysql2,得到了以下幾點:
大廈原生擴展。這 可能需要一段時間...成功 安裝mysql2-0.2.7 1寶石安裝 爲 mysql2-0.2.7安裝文件裏...
封閉類/模塊「mMysql2」的 類客戶端不衆所周知
封閉類/模塊「mMysql2」不知道安裝的RDoc 文檔mysql2-0.2.7 ... 類結果
封閉類/模塊「mMysql2」的 類客戶端不知道
封閉類/模塊「mMysql2」的 類結果不知道mysql2安裝
Asuming,即使文檔我纔不會收到以下錯誤,當我嘗試在我的應用程序啓動的WEBrick。
軌服務器:
/opt/local/lib/ruby/gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: 的dlopen(/選擇/本地/ LIB /紅寶石/寶石/ 1.8 /寶石/ mysql2-0.2.7/LIB/mysql2/mysql2.bundle, 9):庫未加載: libmysqlclient.18.dylib(LoadError)從參考
: /選擇/ local/lib/ruby/gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle 原因:image not found - /opt/local/lib/ruby/gems/1.8/gems/mysql2- 0.2.7/lib/mysql2/mysql2.bundle from /opt/local/lib/ruby/gems/1.8/gems/mysql2-0.2.7/lib/mysql2.rb:8 from /opt/local/lib/ruby/gems/1.8/gems/bundler- 1.0.7/lib/bundler/runtime.rb:64:require' from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in
require'from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb: 62:在each' from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in
需要 '從 /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:ineach' from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in
需要' 從 /選擇/ local/lib目錄/紅寶石/寶石/ 1.8 /寶石/捆紮機-1.0.7/lib目錄/捆綁。rb:112:require' from /Users/summer/Sites/simple_cms/config/application.rb:7 from /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28:in
require'from /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28 from /opt/local/lib /ruby/gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27:intap' from /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27 from script/rails:6:in
需要」 從腳本/軌道:6
你缺少的libmysqlclient-dev的頭試圖尋找在MacPorts的該庫。這是我必須安裝在我的Ubuntu上,以安裝寶石。 – sirfilip 2011-05-06 06:49:53
如何將一個完全不相關的問題標記爲重複? – 2015-03-16 22:51:41