Capistrano 3.1.0部署问题与Rake> = 10.2.0

时间:2014-03-26 16:02:16

标签: ruby rake capistrano rvm-capistrano

我安装了RVM和Capistrano,但似乎遇到了错误。

我的Gemfile:

source 'https://rubygems.org'
gem 'sass'
gem 'compass'
gem 'capistrano-rvm'
gem 'capistrano', '~> 3.1.0'

我的Ruby版本:

$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]

然后我跑:

$ cap install
mkdir -p config/deploy
create config/deploy.rb
create config/deploy/staging.rb
create config/deploy/production.rb
mkdir -p lib/capistrano/tasks
Capified

然后:

$ cap deploy:check
cap aborted!
TypeError: no implicit conversion of Rake::Task into String
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/gems/capistrano-3.1.0/lib/capistrano/application.rb:15:in `run'
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/gems/capistrano-3.1.0/bin/cap:3:in `<top (required)>'
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/bin/cap:23:in `load'
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/bin/cap:23:in `<main>'
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/ianjamieson/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

返回任何内容的唯一上限命令是:

$ cap -V
Capistrano Version: 3.1.0 (Rake Version: 10.2.1)
$ cap -vT
cap deploy                         # Deploy a new release
cap deploy:check                   # Check required files and directories exist
cap deploy:check:directories       # Check shared and release directories exist
cap deploy:check:linked_dirs       # Check directories to be linked exist in shared
cap deploy:check:linked_files      # Check files to be linked exist in shared
cap deploy:check:make_linked_dirs  # Check directories of files to be linked exist in shared
cap deploy:cleanup                 # Clean up old releases
cap deploy:cleanup_rollback        # Remove and archive rolled-back release
cap deploy:finished                # Finished
cap deploy:finishing               # Finish the deployment, clean up server(s)
cap deploy:finishing_rollback      # Finish the rollback, clean up server(s)
cap deploy:log_revision            # Log details of the deploy
cap deploy:published               # Published
cap deploy:publishing              # Publish the release
cap deploy:revert_release          # Revert to previous release timestamp
cap deploy:reverted                # Reverted
cap deploy:reverting               # Revert server(s) to previous release
cap deploy:rollback                # Rollback to previous release
cap deploy:started                 # Started
cap deploy:starting                # Start a deployment, make sure server(s) ready
cap deploy:symlink:linked_dirs     # Symlink linked directories
cap deploy:symlink:linked_files    # Symlink linked files
cap deploy:symlink:release         # Symlink release to current
cap deploy:symlink:shared          # Symlink files and directories from shared to release
cap deploy:updated                 # Updated
cap deploy:updating                # Update server(s) by setting up a new release
cap install                        # Install Capistrano, cap install STAGES=staging,production

有什么想法吗?

2 个答案:

答案 0 :(得分:2)

Capistrano 3.1.0与Rake&gt; = 10.2.0存在兼容性问题。我真的很惊讶cap staging deploy:check为你工作。

我已经提交pull request来修复它,但同时您可以将Gemfile锁定为Rake 10.1.1。

答案 1 :(得分:1)

不知道问题是什么,但尝试运行bundle exec cap staging deploy:check

相关问题