{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/51","repository_url":"https://api.github.com/repos/chef-cookbooks/chef-vault","labels_url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/51/comments","events_url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/51/events","html_url":"https://github.com/chef-cookbooks/chef-vault/issues/51","id":140868203,"number":51,"title":"chef-vault gem no longer being installed","user":{"login":"bleything","id":270,"avatar_url":"https://avatars.githubusercontent.com/u/270?v=3","gravatar_id":"","url":"https://api.github.com/users/bleything","html_url":"https://github.com/bleything","followers_url":"https://api.github.com/users/bleything/followers","following_url":"https://api.github.com/users/bleything/following{/other_user}","gists_url":"https://api.github.com/users/bleything/gists{/gist_id}","starred_url":"https://api.github.com/users/bleything/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleything/subscriptions","organizations_url":"https://api.github.com/users/bleything/orgs","repos_url":"https://api.github.com/users/bleything/repos","events_url":"https://api.github.com/users/bleything/events{/privacy}","received_events_url":"https://api.github.com/users/bleything/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T04:22:45Z","updated_at":"2016-03-15T04:36:44Z","closed_at":null,"body":"Today I provisioned a new node and when Chef ran I got this:\r\n\r\n```\r\n  NameError\r\n  ---------\r\n  uninitialized constant ChefVaultCookbook::ChefVault\r\n  \r\n  Cookbook Trace:\r\n  ---------------\r\n    /var/chef/cache/cookbooks/chef-vault/libraries/helpers.rb:36:in `chef_vault_item'\r\n    /var/chef/cache/cookbooks/orcasnet-chef-vault/libraries/env_vault_item.rb:3:in `env_vault_item'\r\n    /var/chef/cache/cookbooks/orcasnet-appserver/recipes/envdir.rb:46:in `from_file'\r\n    /var/chef/cache/cookbooks/orcasnet-appserver/recipes/default.rb:52:in `from_file'\r\n  \r\n  Relevant File Content:\r\n  ----------------------\r\n  /var/chef/cache/cookbooks/chef-vault/libraries/helpers.rb:\r\n  \r\n   29:    # +node['chef-vault']['databag_fallback']+.\r\n   30:    # @example\r\n   31:    # item = chef_vault_item('secrets', 'bacon')\r\n   32:    # log 'Yeah buddy!' if item['_default']['type']\r\n   33:    # @param [String] bag Name of the data bag to load from.\r\n   34:    # @param [String] id Identifier of the data bag item to load.\r\n   35:    def chef_vault_item(bag, id)\r\n   36>>     if ChefVault::Item.vault?(bag, id)\r\n   37:        ChefVault::Item.load(bag, id)\r\n   38:      elsif node['chef-vault']['databag_fallback']\r\n   39:        Chef::DataBagItem.load(bag, id)\r\n   40:      else\r\n   41:        raise \"Trying to load a regular data bag item #{id} from #{bag}, and databag_fallback is disabled\"\r\n   42:      end\r\n   43:    end\r\n   44:  \r\n   45:    # Helper method which provides an environment wrapper for a data bag.\r\n```\r\n\r\nI dug in a bunch and discovered that starting with version 1.3.1 of this cookbook the chef-vault gem is no longer being installed at compile time, which is why it can't find `ChefVault`.\r\n\r\nI'm guessing it's [this commit](https://github.com/chef-cookbooks/chef-vault/commit/5b7feb19733fceeae78c723a1ec01ef4dfa62371) which was part of #19. Honestly I can't figure out why that change would have caused this but I can't figure out what else it might have been.\r\n\r\n/cc @johnbellone, since that was his change."},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/comments/196652315","html_url":"https://github.com/chef-cookbooks/chef-vault/issues/51#issuecomment-196652315","issue_url":"https://api.github.com/repos/chef-cookbooks/chef-vault/issues/51","id":196652315,"user":{"login":"bleything","id":270,"avatar_url":"https://avatars.githubusercontent.com/u/270?v=3","gravatar_id":"","url":"https://api.github.com/users/bleything","html_url":"https://github.com/bleything","followers_url":"https://api.github.com/users/bleything/followers","following_url":"https://api.github.com/users/bleything/following{/other_user}","gists_url":"https://api.github.com/users/bleything/gists{/gist_id}","starred_url":"https://api.github.com/users/bleything/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleything/subscriptions","organizations_url":"https://api.github.com/users/bleything/orgs","repos_url":"https://api.github.com/users/bleything/repos","events_url":"https://api.github.com/users/bleything/events{/privacy}","received_events_url":"https://api.github.com/users/bleything/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T04:36:44Z","updated_at":"2016-03-15T04:36:44Z","body":"I tried putting this into my cookbook before `include_recipe 'chef-vault'`:\r\n\r\n```ruby\r\nchef_gem 'chef-vault' do\r\n  version node['chef-vault']['version']\r\n  compile_time true\r\nend\r\n```\r\n\r\n... but it didn't make any difference, which is surprising, and makes me wonder if it might be something other than the change I suggested above.\r\n\r\nI've reverted to 1.3.0 for now and am back in business but I'd be really curious to figure out what's going on here. "}}