hotsh/rstat.us — pull request #668 by carols10cents (2012-09-28 16:37:36+00:00)
Title: Only look for the config file if we're actually going to end up using it

I just tried deploying to heroku with a set of commits containing 2c92c82444 and apparently heroku can't find the config file, but it doesn't actually need to (heroku uses the env variables), so this commit just moves those lines into the case that actually uses the config file.

These are the errors I was seeing in the heroku logs:

2012-09-28T16:25:21+00:00 app[web.2]: /usr/local/lib/ruby/1.9.1/syck.rb:145:in `initialize': No such file or directory - /app/config/config.yml (Errno::ENOENT)
2012-09-28T16:25:21+00:00 app[web.2]:	from /usr/local/lib/ruby/1.9.1/syck.rb:145:in `open'
2012-09-28T16:25:21+00:00 app[web.2]:	from /usr/local/lib/ruby/1.9.1/syck.rb:145:in `load_file'
2012-09-28T16:25:21+00:00 app[web.2]:	from /app/config/initializers/secret_token.rb:9:in `'