easily show current version number of your app, stackoverflow style

When your app is deployed in multiple environments (staging, production),
knowing the version number of your deployed app helps a lot, in debugging.
Stackoverflow does a great job of showing a
meaningful version in it’s footer. Currently it shows that it’s version number
as rev 2011.7.22.2. This tells us that the code running stackoverflow was last
updated on 2011.7.22, and that it was updated twice on that same day.

You can set up a similar thing pretty easily if you are using git and rails (rails in
not really needed, but my example shows it using rails). All you need to do is
add the following line to your config/application.rb