I wrote a gem called envious that could be used as an alternative to dotenv: https://github.com/RyanNielson/envious from what I can see it does a few things dotenv doesn't. Good guide though, I wrote Envious when I found out this problem existed.
Basically it adds a yml file, that is added to .gitignore, with configuration settings that get added to ENV. It can even send your environment variables to Heroku using a Rake task. There are some examples on the page. You can use it to have different secret keys depending on your Rails environment as well.
if ENV['SECRET_TOKEN'].blank? raise 'SECRET_TOKEN environment variable is not set!' end
App::Application.config.secret_token = ENV['SECRET_TOKEN']