Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find which version of Capistrano is running

I'm on a shared application environment and there's several ruby versions and gemsets installed (managed via RVM). I need to validate both the Capistrano gem version and ruby version on my deploy since, for example, there's incompatibilities with the 2.14.1 version of Capistrano and ree-1.8.7.

Is there any simple or even hacky way of doing this? I'm executing the call cap _2.13.5_ production deploy to deploy, but I wanted to quit execution with a message back to user if the environment is not correctly set. Seems overkill, but it's a client requirement.

Thanks.

like image 229
mverissimo Avatar asked Oct 24 '25 12:10

mverissimo


2 Answers

If you're asking what version of capistrano will run when you run capistrano, then run "cap -v":

Capistrano Version: 3.10.0 (Rake Version: 12.3.0)
like image 162
codenoob Avatar answered Oct 26 '25 23:10

codenoob


add capistrano to Gemfile and execute using bundle exec cap production deploy

as for production - put your server configuration into the production task/stage and capistrano will fail to deploy because o the missing server.

like image 24
mpapis Avatar answered Oct 27 '25 00:10

mpapis