I don't really like the suggested approach in the Heroku docs for setting config vars locally:
http://docs.heroku.com/config-vars#local-setup I have an open-source project I'm working to get onto Heroku, so I decided to do some work and come up with a better solution (to my mind, anyway)... Here's the basic idea: You have a config/config.yml file that has all of your local config stuff. If looks a lot like database.yml. You have a little trickery in environment.rb to prefer the Heroku ENV style of setting config vars (in production), but you fall back to your config.yml if the config vars aren't found in ENV (in dev/test). Then, you have a rake task (rake heroku:config) that sends all of the config vars up to Heroku for use the production environment. That way, you've got all of your config vars stored with your project (.gitignored, of course), and can easily set what you need on Heroku. You can see the relevant files here: http://github.com/trevorturk/el-dorado/blob/8af62d1875ec1091ef1202c3f8c6c58c932076d7/config/config.example.yml http://github.com/trevorturk/el-dorado/blob/8af62d1875ec1091ef1202c3f8c6c58c932076d7/config/environment.rb http://github.com/trevorturk/el-dorado/blob/8af62d1875ec1091ef1202c3f8c6c58c932076d7/lib/tasks/heroku.rake The result is a pretty nice, I think. You can see the installation instructions here, if you're curious about the flow: http://github.com/trevorturk/el-dorado/tree/master I'd love to get some feedback on this strategy. I really like it so far :) Thanks, - Trevor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
