securing your database.yml 1
During the Intro to Rails portion of tonight’s Philly on Rails, a question was raised asking if there was a better way to give Rails your database password, rather then storing it in the database.yml file.
I tried the method below, which seems to work:
development:
adapter: mysql
database: whatever_development
username: whatever
password: <%= gets %>
socket: /tmp/mysql.sockThe first time the database is accessed by Rails, you can simply enter the password at the script/server prompt and you’re in business.
However, I’m not sure how this would work with the -d option on script/server. I imagine it would not work.
