maintenance icon indicating copy to clipboard operation
maintenance copied to clipboard

Tasks not available?

Open philsmy opened this issue 4 years ago • 1 comments

I must be doing something wrong at the very basic level.

Gem is installed:

% bundle list | grep capis
  * capistrano (3.16.0)
  * capistrano-bundler (2.0.1)
  * capistrano-maintenance (1.2.1)
  * capistrano-passenger (0.2.1)
  * capistrano-rails (1.6.1)
  * capistrano-rbenv (2.2.0)

But I get:

% bundle exec cap staging maintenance:disable
(Backtrace restricted to imported tasks)
cap aborted!
Don't know how to build task 'maintenance:disable' (See the list of available tasks with `cap --tasks`)

(See full trace by running task with --trace)

And this is strange:

% cap production doctor:gems

Gems

    capistrano           3.16.0
    airbrussh            1.4.0
    rake                 13.0.3
    sshkit               1.21.2
    net-ssh              6.1.0
    capistrano-bundler   2.0.1
    capistrano-passenger 0.2.1
    capistrano-rails     1.6.1
    capistrano-rbenv     2.2.0

Am I missing a step somewhere?

philsmy avatar Jun 14 '21 03:06 philsmy

Have you added the gem to your Capfile?

require "capistrano/maintenance"

It should go near the bottom of the Capfile, i.e. here:

https://github.com/capistrano/capistrano/blob/f5a16779a7e6ddf6768ea2c1f39b101ffeba796b/lib/capistrano/templates/Capfile#L36

mattbrictson avatar Jun 15 '21 01:06 mattbrictson