How to find out which rails version an existing rails application is built on?
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.2-p95 (x86_64-darwin14)
RubyGems version 2.4.6
...
rake gems
will print out what gems, dependencies, and versions are installed, frozen, etc.
If you are using bundler than you can use bundle show
to list all the gems that your app is using.
In my project rake gems
do not display the rails version but it's display at the top of the environment.rb
file :
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION