Tag: rubygems

Library not loaded:libmysqlclient.16.dylib在使用mysql2 gem在OS X 10.6上运行'rails server'时出错

我一直在为此奋斗一段时间。 我在Snow Leopard机器上安装了Rails 3,gem,mysql。 一切进展顺利,直到我创建了我的第一个项目,并试图运行 rails server 运行这个我得到: jontybrook$ rails server /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: image not found – /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle from /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2.rb:7 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' from /Users/jontybrook/Dropbox/CODING/simple_cms/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28:in […]

安装mysql2时出错:无法构建gem原生扩展

当我尝试安装Rails的mysql2 gem时遇到一些问题。 当我尝试通过运行bundle install或gem install mysql2来安装它时,它给了我以下错误: 安装mysql2时出错:错误:无法构建gem原生扩展。 我怎样才能解决这个问题,并成功安装mysql2 ?