无法启动服务器Ruby on Rails

时间:2011-07-02 23:33:55

标签: ruby-on-rails ruby

获取以下错误

 /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

2 个答案:

答案 0 :(得分:0)

这是堆栈跟踪中的线索:

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

您需要确保此sqlclient库为on your load path

答案 1 :(得分:0)

我刚做了一个捆绑安装,它工作正常! -