0

我的 Rails 应用程序运行良好,但最近 Dreamhost 移出了他们的服务器(* 类似的东西),现在我无法通过 capistrano 部署..

我收到此错误消息:

libmysqlclient_r.so.15: cannot open shared object file: No such file or directory - /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so

原始版本:

[direct.soprojetos.com.br] executing command ** [out :: direct.soprojetos.com.br] /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:199: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/capistrano-ea5b03b4d38e/capistrano.gemspec:15: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/kendoui_rails-dc276aceb446/kendoui-rails.gemspec:18: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/pagseguro-fa2c22e88177/pagseguro.gemspec:15: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:132: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] rake aborted! ** [out :: direct.soprojetos.com.br] libmysqlclient_r.so.15: cannot open shared object file: No such file or directory - /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/config/application.rb:14 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/Rakefile:5:inrequire' ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/Rakefile:5 ** [out :: direct.soprojetos.com.br] (通过运行查看完整跟踪带有 --trace) 命令的任务在 9957 毫秒内完成 * [deploy:update_code] 回滚 * 执行 "rm -rf /home/soprojetos/cap/releases/20130208183759; true" 服务器:["direct.soprojetos.com.br"] [direct.soprojetos.com.br] 执行命令命令在 13266 毫秒内完成 *[pushover:notify_deploy_started] 回滚失败:“env PATH=$PATH:/usr/lib/ruby/gems/1.8/bin/ sh -c 'cd -- /home/soprojetos/cap/releases/20130208183759 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/soprojetos/cap/shared/assets/manifest.yml /home/soprojetos/cap/releases/20130208183759/assets_manifest.yml'”在direct.soprojetos.com上。 br`

谁能救我?

4

2 回答 2

1

我猜有一个操作系统升级,在某些时候与mysql相关的东西要么被删除要么没有升级。

这在 Ubuntu 16.04.4 上对我有用:

gem uninstall mysql2
sudo apt-get install libmysqlclient-dev
gem install mysql2

您可能需要重新启动 apache 或任何给您错误的服务。

请注意,如果你这样做

gem uninstall mysql2
gem install mysql2

你的系统应该告诉你需要安装什么才能安装 mysql2 gem,在我的例子中是上面的 apt-get 命令。

于 2018-03-19T09:07:54.180 回答
-1

尝试换成 mysql2 gem https://rubygems.org/gems/mysql2

于 2013-02-08T20:08:20.837 回答