title: How do I see the ENV vars in a Rails app?
body: <p>I am taking over an old Rails app. No one has touched it in a year. The last developer left in April of 2015 and I have no way to contact him. I do have ssh access to the server, and I have access to the Github repo. </p>
  
  <p>I don't know any of the usernames/passwords. </p>
  
  <p>If I ssh to the server and I cat the database.yml file, I see stuff like: </p>
  
  <pre><code>  staging:
          adapter: mysql2
          encoding: utf8
          pool: 5
          socket: /var/lib/mysql/mysql.sock
          database: o_wawa_stage
          username: wawa_stage
          password: &lt;%= ENV['STAGE_DATABASE_PASSWORD'] %&gt;
          host: access.dmedia.com
  </code></pre>
  
  <p>If I run the "printenv" command then I don't see any of these vars. I assume they are only loaded by the Rails environment. </p>
  
  <p>I guess I can edit the templates to spit out the values with a bunch of "put" statements, but I'm thinking there must be a more obvious way to do this, other than printing the data where the public could see it? </p>
  
  <p>If I try to run "rails console" I get: </p>
  
  <pre><code>  Rails Error: Unable to access log file. Please ensure that /var/www/haha/production/releases/20150118213616/log/development.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/www/haha/production/releases/20150118213616/log/development.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
  </code></pre>
  
  <p>I don't have sudo on this box, so I can not address the error. </p>