title: Declaring In-Line Secret Keys in Ruby On Rails
body: <p>I'm learning Ruby On Rails.  I'm trying to use the aws-s3 gem to access Amazon S3.  One line of my controller code reads:</p>
  
  <pre><code>AWS::S3::Base.establish_connection!(
        :access_key_id     =&gt; 'myrealaccesskeyishere',
        :secret_access_key =&gt; 'myrealsecretkeyishere'
  )
  </code></pre>
  
  <p>I've noticed that if I make an error, sometimes rails will come back and show a few lines of code where it thinks the error might be.  Should I not be writing these out in the .rb controller files like this?  Am I potentially risking my secret key?  If so, how should I be doing this instead?</p>