Is there any convention about how/where to specify application's version number?
For example, for the ruby gems lib/mygem/version.rb
is the file generally used for that purpose.
My guess would be creating config/version.rb
file like that:
module MySite
VERSION = "0.0.4"
# or in MySite::Application class
#
# class Application
# VERSION = "0.0.4"
# end
end
Use the command: rake about . This command will output the following info plus more (hence the ellipsis: About your application's environment Rails version 4.2. 0 Ruby version 2.2.
I will reply my own question, I was not able to find a better answer.
Since Rails application is basically MySite::Application
I thought app's version should be accessed by MySite::Application::VERSION
so create :
config/initializers/version.rb
module MySite
class Application
VERSION = "0.0.4"
end
end
or config/version.rb
and require this file from config/application.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With