In general, the question I have is the question in the title:
How do I find out which rails version an existing rails application is built on?
More specifically for my purposes, I would like to know how to find out in the case when there is no gemfile (I'm relatively new to rails and used to seeing the rails version in the gemfile with all the rails 3 apps, but am not sure for older versions.)
There's nothing you need to do to manage two different Rails versions. The only thing you'll want to do is gem install rails to get the latest version and create your new project with rails new myapp . That will make sure the new project starts with Rails 5.1 (or whatever is the latest at the time).
To install Rails, use the gem install command along with the -v flag to specify the version. For this tutorial, you'll use version 6.1. 4.1 : gem install rails -v 6.1.
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.
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