Chef:在 chef-client 期间更新 cookbook 所需的客户端 gem

Chef: Update gem on client needed by cookbook during chef-client

我最近更新了一个 Ubuntu 盒子,它是 运行 作为厨师客户。当我尝试 chef-client 服务器时,出现以下错误:

================================================================================
Error executing action `create` on resource 'mysql_database[myapp_prod]'
================================================================================


RuntimeError
------------
Incorrect MySQL client library version! This gem was compiled for 5.5.29 but the client library is 5.6.15.


Cookbook Trace:
---------------
/var/cache/chef/cookbooks/database/libraries/provider_database_mysql.rb:29:in `load_current_resource'

如何在此处重新安装说明书所依赖的 gem?我试过更新系统 gem 没有用。

Chef 有自己的 ruby 嵌入式,最佳选择:

/opt/chef/embedded/bin/gem uninstall mysql