title: Cannot find a resource for cookbook on ubuntu version 14.04
body: <p>I'm trying to use chef-solo to make a VM have a particular hostname.  It seems chef has a feature to include other people's recipes in your own which contain complex logic to account for edgecase scenarios such as hostname.sh being removed from platforms.  I get the below error when trying to use chef-solo to apply my recipe.  </p>
  
  <pre><code>NameError
  ---------
  Cannot find a resource for cookbook on ubuntu version 14.04
  
  
  Cookbook Trace:
  ---------------
    /home/vagrant/chef/cookbooks/op/recipes/default.rb:17:in `from_file'
  
  
  Relevant File Content:
  ----------------------
  /home/vagrant/chef/cookbooks/op/recipes/default.rb:
  
   10:  # username is pretty fragile...
   11:  username = File.basename(Dir['/home/*'].first)
   12:  
   13:  file '/etc/motd' do
   14:    content "#{hostname}\n\nThis server does: \n-Dokku"
   15:  end
   16:  
   17&gt;&gt; cookbook 'hostname', '~&gt; 0.4.0'
   18:  
   19:  default_attributes :set_fqdn =&gt; '*.project-domain.com'
   20: 
  </code></pre>
  
  <p>Here are the complete contents of the recipe I'm trying to configure:
  (chef/cookbooks/op/recipes/default.rb)</p>
  
  <pre><code># --- Install packages we need ---
  package 'ntp'
  package 'sysstat'
  package 'git'
  
  # --- Set host name ---
  # Note how this is plain Ruby code, so we can define variables to
  # DRY up our code:
  hostname = 'epd-dokku.local'
  # username is pretty fragile...
  username = File.basename(Dir['/home/*'].first)
  
  file '/etc/motd' do
    content "#{hostname}\n\nThis server does: \n-Dokku"
  end
  
  cookbook 'hostname', '~&gt; 0.4.0'
  
  default_attributes :set_fqdn =&gt; '*.project-domain.com'
  
  # file '/etc/hostname' do
  #   content "#{hostname}\n"
  # end
  #
  # service 'hostname.sh' do
  #   action :restart
  # end
  
  file '/etc/hosts' do
    content "127.0.0.1 localhost #{hostname}\n"
  end
  
  
  #########################
  # Put dotfiles in place #
  #########################
  
  git "#{ENV['HOME']}/dotfiles" do
    repository "https://github.com/my_gh_name/dotfiles.git"
    action :checkout
  end
  
  # you still need to run ./make.sh as the actual non-root user acct though...
  execute "#{ENV['HOME']}/dotfiles/make.sh" do
    # user username
    cwd "#{ENV['HOME']}/dotfiles"
  end
  
  ["#{ENV['HOME']}/.this_machine", "/home/#{username}/.this_machine"].each do |this_machine_path|
    file this_machine_path do
      content "bash_display_style=server"
    end
  end
  </code></pre>
  
  <p>I have a suspicion that the code required to use hostname must be different from what I have currently.  </p>
  
  <pre><code>cookbook 'hostname', '~&gt; 0.4.0'
  
  default_attributes :set_fqdn =&gt; '*.project-domain.com'
  </code></pre>