无法加载capistrano-recipes

时间:2013-11-09 15:42:10

标签: ruby capistrano recipe

我已经为我的Gemfile添加了capistrano-recipes

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'

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

2 个答案:

答案 0 :(得分:1)

From the README,这是您应该在部署脚本中添加的内容:

require 'capistrano_recipes'

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

答案 1 :(得分:0)

全局安装gem

gem install capistrano-recipes 
cap -T

或只是:

bundle exec cap -T