我的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:in
需要”
** [out :: direct.soprojetos.com.br] / home / soprojetos / cap / releases / 20130208183759 / Rakefile:5
** [out :: direct.soprojetos.com.br](通过使用--trace运行任务查看完整跟踪)
命令在9957ms完成
* [deploy:update_code]回滚
*执行“rm -rf / home / soprojetos / cap / releases / 20130208183759; true”
服务器:[“direct.soprojetos.com.br”]
[direct.soprojetos.com.br]执行命令
命令在13266ms完成
* [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 =资产资产:预编译&& cp - /home/soprojetos/cap/shared/assets/manifest.yml /home/soprojetos/cap/releases/20130208183759/assets_manifest.yml'“on direct.soprojetos.com.br
`
答案 0 :(得分:0)
我猜测有一次操作系统升级,并且在某些时候,某些与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命令。
答案 1 :(得分:-1)
尝试交换mysql2 gem https://rubygems.org/gems/mysql2