We use the wonderful semantic versioning paradigm when versioning our rails app. One question I had was where is it best to store this number? I’ve seen it stored in /lib, environment.rb, etc.
Just wondering what people thought as to best practices?
I don’t really think there’s any convention for this. I guess it’s all about what seems natural to you.
Some places the version number can be placed are in:
config/environment.rbconfig/application.rbconfig/initializers/version.rbby adding:
Regardless of which option you choose (from above) – the VERSION constant will be set at the initialization of the app.
For my blog I just update the footer of my layout – as the version number isn’t used anywhere else.
The
lib-folder does sound a bit strange though, as this folder is meant to store re-usable modules.