A
A
Anton Misyagin2015-12-03 22:26:24
ruby
Anton Misyagin, 2015-12-03 22:26:24

How to run ruby ​​gems through capistrano?

ubuntu server target machine. capistrano works. I can do something like:

desc 'Релоад nginx'
  task :reload do
    on roles :all do
      sudo :service, :nginx, :reload
    end
  end

but for some reason I can’t run, for example, rake, backup
For example, this doesn’t work:
desc 'Выполнение бекапа'
  task :perform do
    on roles :all do
       execute :backup, "perform --trigger mybackup"
    end
  end

linux gives an error command backup not found, although if you connect to a server and manually run from any folder, the backup will work.
capistrano produces the following log:
INFO [9a6dd502] Running /usr/bin/env backup perform --trigger mybackup as [email protected]

I suspect that the /usr/bin/env prefix is ​​the problem, but it prepends it to every command and the other commands work.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question