title: Referencing attributes from within a Chef recipe
body: <p>I have an attribute file titled <code>default.rb</code> with a key in it <code>default['current']</code> that stores a dir in string format. I wanted to use this for the following command to use when it changes directories:</p>
  
  <pre><code># Run database migrations
  execute 'database migrations' do
    user    'ubuntu'
    cwd     "#{default['current']}"
    command 'sudo php artisan down &amp;&amp; sudo php artisan migrate --force &amp;&amp; sudo php artisan up'
  end
  </code></pre>
  
  <p>Instead when i ran the recipe i got the following error.</p>
  
  <pre><code>NameError
  ---------
  No resource, method, or local variable named `default' for `Chef::Recipe "deploy"'
  </code></pre>
  
  <p>Is there a proper way to do this that I'm missing? I'd rather not hard code in the working directory.</p>