<i id='ZA63M'><tr id='ZA63M'><dt id='ZA63M'><q id='ZA63M'><span id='ZA63M'><b id='ZA63M'><form id='ZA63M'><ins id='ZA63M'></ins><ul id='ZA63M'></ul><sub id='ZA63M'></sub></form><legend id='ZA63M'></legend><bdo id='ZA63M'><pre id='ZA63M'><center id='ZA63M'></center></pre></bdo></b><th id='ZA63M'></th></span></q></dt></tr></i><div id='ZA63M'><tfoot id='ZA63M'></tfoot><dl id='ZA63M'><fieldset id='ZA63M'></fieldset></dl></div>

  • <legend id='ZA63M'><style id='ZA63M'><dir id='ZA63M'><q id='ZA63M'></q></dir></style></legend>

    <tfoot id='ZA63M'></tfoot>
    1. <small id='ZA63M'></small><noframes id='ZA63M'>

      • <bdo id='ZA63M'></bdo><ul id='ZA63M'></ul>

        库未加载:尝试使用 mysql2 gem 在 OS X 10.6 上运行“

        时间:2023-08-17

        <small id='EXGXb'></small><noframes id='EXGXb'>

      1. <legend id='EXGXb'><style id='EXGXb'><dir id='EXGXb'><q id='EXGXb'></q></dir></style></legend>

      2. <i id='EXGXb'><tr id='EXGXb'><dt id='EXGXb'><q id='EXGXb'><span id='EXGXb'><b id='EXGXb'><form id='EXGXb'><ins id='EXGXb'></ins><ul id='EXGXb'></ul><sub id='EXGXb'></sub></form><legend id='EXGXb'></legend><bdo id='EXGXb'><pre id='EXGXb'><center id='EXGXb'></center></pre></bdo></b><th id='EXGXb'></th></span></q></dt></tr></i><div id='EXGXb'><tfoot id='EXGXb'></tfoot><dl id='EXGXb'><fieldset id='EXGXb'></fieldset></dl></div>

              <tbody id='EXGXb'></tbody>

              • <bdo id='EXGXb'></bdo><ul id='EXGXb'></ul>
                <tfoot id='EXGXb'></tfoot>
                • 本文介绍了库未加载:尝试使用 mysql2 gem 在 OS X 10.6 上运行“rails server"时出现 libmysqlclient.16.dylib 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我已经为此苦苦挣扎了一段时间.

                  I've been struggling with this for some time.

                  我已经在我的 Snow Leopard 机器上安装了 Rails 3、gem、mysql.一切都很顺利,直到我创建了我的第一个项目并尝试运行

                  I've installed Rails 3, gem, mysql on my Snow Leopard machine. All was going well until I created my first project and tried to run

                  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 `require'
                      from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28
                      from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'
                      from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27
                      from script/rails:6:in `require'
                      from script/rails:6
                  jontybrook$ 
                  

                  据我所知,问题出在 mysql2 gem 上.MySQL 似乎运行良好,我的 Gemfile 引用了 mysql2,我的 database.yml 文件似乎也正常.

                  As far as I can tell the problem is with the mysql2 gem. MySQL seems to be running fine and my Gemfile references mysql2, my database.yml file seems ok also.

                  错误提到

                  Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
                  

                  还有

                  jontybrook$ cd /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2
                  jontybrook$ ls
                  client.rb   em.rb       error.rb      mysql2.bundle result.rb
                  

                  MySQL2.bundle 有没有!?

                  MySQL2.bundle is there!?

                  如果我使用旧的 mysql gem,WEBrick 启动正常.但这并不理想,不是吗?

                  If I use the old mysql gem, WEBrick boots fine. But that's not ideal, is it?

                  我已经尝试了谷歌能给我的一切!非常感谢任何帮助.

                  I've tried everything google can give me! Any help much appreciated.

                  推荐答案

                  我从来没能得到这些答案中的任何一个对我有用,但这是我用来让它对我有用的命令.这样你就不需要每次更新你的mysql时都使用 install_name_tool

                  I was never able to get any of these answers to work for me, but this is the command that I used to make it work for me. This way you don't need to use install_name_tool every time you update your mysql

                  sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
                  

                  这篇关于库未加载:尝试使用 mysql2 gem 在 OS X 10.6 上运行“rails server"时出现 libmysqlclient.16.dylib 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 MySQL 数据库中存储纬度/经度时使用的理想数据 下一篇:我应该如何处理 MySQL 中的 --secure-file-priv?

                  相关文章

                  最新文章

                • <small id='0b04k'></small><noframes id='0b04k'>

                • <tfoot id='0b04k'></tfoot>

                  1. <i id='0b04k'><tr id='0b04k'><dt id='0b04k'><q id='0b04k'><span id='0b04k'><b id='0b04k'><form id='0b04k'><ins id='0b04k'></ins><ul id='0b04k'></ul><sub id='0b04k'></sub></form><legend id='0b04k'></legend><bdo id='0b04k'><pre id='0b04k'><center id='0b04k'></center></pre></bdo></b><th id='0b04k'></th></span></q></dt></tr></i><div id='0b04k'><tfoot id='0b04k'></tfoot><dl id='0b04k'><fieldset id='0b04k'></fieldset></dl></div>

                      <legend id='0b04k'><style id='0b04k'><dir id='0b04k'><q id='0b04k'></q></dir></style></legend>
                        <bdo id='0b04k'></bdo><ul id='0b04k'></ul>