sous-chefs / mysql

Development repository for the mysql cookbook
https://supermarket.chef.io/cookbooks/mysql
Apache License 2.0
338 stars 690 forks source link

uninitialized constant MysqlCookbook::HelpersBase #544

Closed heaven closed 6 years ago

heaven commented 6 years ago

Perhaps the changes were backported from version 8, the helper was renamed to MysqlCookbook::HelpersBase, but in 7 it is MysqlCookbook::Helpers.

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/mysql/libraries/mysql_client_installation_package.rb
================================================================================

NameError
---------
uninitialized constant MysqlCookbook::HelpersBase

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/mysql/libraries/mysql_client_installation_package.rb:5:in `<class:MysqlClientInstallationPackage>'
  /var/chef/cache/cookbooks/mysql/libraries/mysql_client_installation_package.rb:2:in `<module:MysqlCookbook>'
  /var/chef/cache/cookbooks/mysql/libraries/mysql_client_installation_package.rb:1:in `<top (required)>'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/mysql/libraries/mysql_client_installation_package.rb:

  1:  module MysqlCookbook
  2:    class MysqlClientInstallationPackage < MysqlBase
  3:      # helper methods
  4:      require_relative 'helpers'
  5>>     include MysqlCookbook::HelpersBase
  6:
  7:      # Resource properties
  8:      resource_name :mysql_client_installation_package
  9:      provides :mysql_client_installation, os: 'linux'
 10:      provides :mysql_client, os: 'linux'
 11:
 12:      property :package_name, [String, Array], default: lazy { default_client_package_name }, desired_state: false
 13:      property :package_options, [String, nil], desired_state: false
 14:      property :package_version, [String, nil], default: nil, desired_state: false

System Info:
------------
chef_version=12.21.26
platform=ubuntu
platform_version=16.04
ruby=ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux]
program_name=chef-client worker: ppid=18678;start=05:44:25;
executable=/opt/chef/bin/chef-client
heaven commented 6 years ago

In 8.5.1 the situation is opposite, I am getting uninitialized constant MysqlCookbook::Helpers.

heaven commented 6 years ago

Whoops, it's I broke the cookbook.

roylindauer commented 6 years ago

How did you break and fix this? I am having the same issue and cannot figure it out.

roylindauer commented 6 years ago

Nevermind I also fixed it. Had to delete a cached cookbook

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.