1

我已将 capistrano-recipes 添加到我的 Gemfile

group :development do
  ...
  gem 'capistrano-recipes',require: false
end

添加到我的部署脚本中:

require 'capistrano-recipes'

捆绑列表的结果:

bundle list | grep capistrano
  * capistrano (2.15.5)
  * capistrano-ext (1.2.1)
  * capistrano-platform-resources (0.1.3)
  * capistrano-rbenv (1.0.5)
  * capistrano-recipes (0.8.0)

但是当我像cap -T我一样运行命令时出现错误:

/usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require': cannot load such file -- capistrano-recipes (LoadError)
    from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require'
    from ./config/deploy.rb:12:in `load'

这里可能有什么问题?谢谢

4

2 回答 2

1

从 README中,您应该在部署脚本中添加以下内容:

require 'capistrano_recipes'

请注意,它使用下划线,而不是连字符。

于 2013-11-10T04:04:52.077 回答
0

全局安装 gem

gem install capistrano-recipes 
cap -T

要不就:

bundle exec cap -T
于 2013-11-09T18:29:41.203 回答