Mysql2 gem + Mavericks + Rails

时间:2014-07-16 02:58:01

标签: mysql ruby-on-rails ruby

在我将机器升级为Mavericks之后,我对此感到很不满,而我只是无法让轨道再次运行。我试过通过brew重新安装mysql,我重新安装了MAMP,我重新安装了mysql2 gem。一切都是徒劳。我也尝试过如上所述创建软链接 Unable to start server in rails with mysql db 这是我的错误:

/Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require': dlopen(/Users/babblerstudio/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.13/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/lib/libmysqlclient.18.dylib
  Reason: image not found - /Users/babblerstudio/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.13/mysql2/mysql2.bundle
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `<top (required)>'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
    from /Users/babblerstudio/Desktop/arjun/work/colloquy_new/config/application.rb:7:in `<top (required)>'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /Users/babblerstudio/.rvm/gems/ruby-2.1.2/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

我在这里看了答案Unable to start server in rails with mysql db,当我运行命令时,没有任何改变,现在它告诉我文件已经存在。

$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
ln: /usr/lib/libmysqlclient.18.dylib: File exists

我对此非常沮丧。请帮忙!

1 个答案:

答案 0 :(得分:0)

我重新安装了一切。 Node,rvm,ruby,所有宝石。它起作用了。