title: How do you access a Ruby on Rails Rails.root.join yml file from the console?
body: <p>I have data stored in the following file: <em>guess what data it is? :)</em></p>
  
  <pre><code>S3_CREDENTIALS = Rails.root.join("config/s3.yml")
  </code></pre>
  
  <p>To confirm it's working, I fired up rails console and found S3_CREDENTIALS is a Pathname object.  But I'm having trouble confirming that the data is there.  How would I access the bucket data, for example?</p>
  
  <pre><code>Loading development environment (Rails 3.1.0.beta1)
  &gt;&gt; S3_CREDENTIALS.isdir
  NoMethodError: undefined method `isdir' for #&lt;Pathname:0x10212f6f8&gt;
      from (irb):1
  &gt;&gt; S3_CREDENTIALS.size
  =&gt; 282
  &gt;&gt; S3_CREDENTIALS.data
  NoMethodError: undefined method `data' for #&lt;Pathname:0x10212f6f8&gt;
      from (irb):3
  &gt;&gt; S3_CREDENTIALS[:bucket]
  NoMethodError: undefined method `[]' for #&lt;Pathname:0x10212f6f8&gt;
      from (irb):4
  &gt;&gt; 
  </code></pre>
  
  <p>On a related note, would this still work if I changed the file from s3.yml to s3.json?</p>