不知道如何构建任务' symlink_directories'

时间:2016-12-26 15:31:10

标签: ruby-on-rails rake capistrano capistrano3 rvm1-capistrano3

升级rails项目后,我尝试使用capistrano部署并突然收到此错误:

Tasks: TOP => deploy:restart
(See full trace by running task with --trace)
The deploy has failed with an error: Don't know how to build task 'symlink_directories' (see --tasks)

我的Capfile

# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

require "rvm1/capistrano3"
require "capistrano/bundler"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
require "capistrano/rails"
require "capistrano/passenger"

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

Gemfile.lock与capistrano相关的宝石:

    capistrano (3.7.1)
      capistrano-harrow
    capistrano-bundler (1.2.0)
      capistrano (~> 3.1)
    capistrano-harrow (0.5.3)
    capistrano-passenger (0.2.0)
      capistrano (~> 3.0)
    capistrano-rails (1.2.1)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    rvm1-capistrano3 (1.4.0)
      capistrano (~> 3.0)
      capistrano (>= 3.5.0)
  capistrano (~> 3.7)
  capistrano-bundler (~> 1.2)
  capistrano-passenger
  capistrano-rails (~> 1.2)
  rvm1-capistrano3

1 个答案:

答案 0 :(得分:0)

我跑了cap -T | grep symlink,看到那里有一个类似名字的任务,所以我只是通过从deploy命名空间调用来帮助解决问题。

cap deploy:symlink:linked_dirs     # Symlink linked directories