0

So here is the weird part. I'm using the ubuntu-14.04 platform for my test kitchen setup, and I'm also using bento/ubuntu-14.04 for my vagrant node.

They should be the same right? I'm basically following the Chef tutorial Manage a Web App, and kitchen passes perfectly; but when I deploy to the node using knife ssh localhost --ssh-port 2222 'sudo chef client' ...etc... it stops with the following:

localhost Recipe: awesome_customers_ubuntu::database
localhost   * mysql_database[my_company] action createIgnoring mysql2-0.3.17 because its extensions are not built.  Try: gem pristine mysql2 --version 0.3.17
localhost
localhost
localhost     ================================================================================
localhost     Error executing action `create` on resource 'mysql_database[my_company]'
localhost     ================================================================================
localhost
localhost     LoadError
localhost     ---------
localhost     cannot load such file -- mysql2

So I have 2 questions.

  1. How do I solve this?
  2. Why is this happening, if both kitchen and my node are bento-based?
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206

1 Answers1

2

You need to install the mysql2_chef_gem first before calling mysql_database

mysql2_chef_gem "default" do
  gem_version "0.4.4"
  action :install
end

Somehow your TK node has gotten that installed.

lamont
  • 3,854
  • 1
  • 20
  • 26