dan-klasson
dan-klasson

Reputation: 14180

Getting rails version on production with RVM

So I have a rails app that is up and running with puma and RVM. All I want is to know what rails version it is running. ruby -v works, but rails -v doesn't.

Here's my output:

deploy@foo:/data/apps/foo.staging/current$ ruby -v
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]

deploy@foo:/data/apps/foo.staging/current$ rails -v
The program 'rails' can be found in the following packages:
 * rails
 * ruby-railties-3.2
Try: sudo apt-get install <selected package>

deploy@foo:/data/apps/foo.staging/current$ rvm list

rvm rubies

=* ruby-2.0.0-p353 [ x86_64 ]

#  => - current
# =* - current && default
#  * - default

deploy@foo:/data/apps/foo.staging/current$ rvm gemset list

gemsets for ruby-2.0.0-p353 (found in /home/deploy/.rvm/gems/ruby-2.0.0-p353)
   (default)
   global

Upvotes: 0

Views: 146

Answers (2)

Hawkeye001
Hawkeye001

Reputation: 811

If you are using bundler, you can run:

bundle exec rails -v

Upvotes: 1

Wizard of Ogz
Wizard of Ogz

Reputation: 12643

You can check in Gemfile.lock to see which version of Rails your app is using.

Upvotes: 1

Related Questions