1
$ bundle exec cap deploy:setup
/Users/development/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit.rb:3: 
  warning: already initialized constant SSHKit::StandardError
/Users/development/.rvm/gems/ruby-2.0.0-p247@global/gems/sshkit-1.1.0/lib/sshkit.rb:3: 
  warning: previous definition of StandardError was here

cap aborted!
undefined method `instance' for Capistrano::Configuration:Class
/Users/development/.rvm/gems/ruby-2.0.0-p247@global/gems/railsless-deploy-1.1.2/lib/railsless-deploy.rb:1:in `<top (required)>'
/Users/development/Sites/singapore/Capfile:1:in `require'
/Users/development/Sites/singapore/Capfile:1:in `<top (required)>'
/Users/development/.rvm/gems/ruby-2.0.0-p247@global/gems/capistrano-3.0.0/lib/capistrano/application.rb:22:in `load_rakefile'
/Users/development/.rvm/gems/ruby-2.0.0-p247@global/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
/Users/development/.rvm/gems/ruby-2.0.0-p247@global/gems/capistrano-3.0.0/bin/cap:3:in `<top (required)>'

我对 capistrano 相当陌生,但过去曾成功使用过它,没有遇到这么多问题。有谁知道解决这个问题?

4

2 回答 2

2

我对 capistrano 相当陌生,但过去曾成功使用过它,没有遇到这么多问题。有谁知道解决这个问题?

我想您需要保留版本 2,修改 中的行Gemfile,以读取如下内容:

gem "capistrano", "~> 2.15.0"
于 2013-10-31T12:58:39.327 回答
0

我有同样的问题,但我必须做几个步骤才能让它工作。首先卸载所有现有版本的 Capistrano(如果您有多个版本,请全部删除

sudo gem uninstall Capistrano

然后Gemfile使用上面给出的文本将 a 添加到您的存储库中

gem "capistrano", "~> 2.15.0"

确保您已bundle安装

sudo gem install bundler

最后安装

sudo bundle install
于 2013-11-16T01:42:26.330 回答