A Rails application is usually deployed using tools like
capistrano. These tools tend to create a folder for each deployment and the name of the folder is usually a number indicating how many times the same app has been deployed in the same folder. Assuming that for each deployment the app changes, we could use this name/number as ‘version’ of the application.
There are at least 2 ways to get this version number:
split (takes advantage of the String class)
basename (takes advantage of
I prefer the second.comments powered by Disqus