V
V
Vitaly Liber2015-07-01 13:05:37
Ruby on Rails
Vitaly Liber, 2015-07-01 13:05:37

How to find out on which version of Ruby and Rails the site is running through Capistrano?

I'm deploying the site via Capistrano to the server.
How can I find out what version of Ruby and Rails my site is running on?
I have access to the server via ssh.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Vsk, 2015-07-01
@viktorvsk

What do you mean by website version? Capistrano doesn't have versions, Mina does have versions
Capistrano names releases as timestamps
If you're specifically interested in which release is "launched", see where the current/ directory symlink points (ls -l)
UPD :
Exactly, we're talking about other versions.
In general, indeed, rails -v and ruby ​​-v should work.
But it's probably better to do this:
Check the rail version in the Gemfile (or in extreme cases, in Gemfile.lock) Check the
ruby ​​version like this:
- First determine if rvm or rbenv is being used (rvm list, rbenv versions). If used, then also look at the application launch commands, if there are any additionally (Foreman, Monit, God ...)
- If there is neither rvm nor rbenv, then system ruby ​​(ruby -v)
Also, the ruby ​​version must be specified in deploy.rb (for example, as a setting set :rbenv_ruby, '2.2.2')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question