我通过Magentify使用capistrano。我在archlinux上使用RVM作为常规用户。我使用Ruby 2.0.0并在我为此目的定义的gemset中运行gem install magentify
。它安装了Capistrano 3.0.1和大约9个其他宝石。当我设置食谱时,我尝试了
cap -T
它写了
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymikeandtheboys/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
我也尝试cap deploy
得到了相同的结果(不确定我的预期。)如何开始尝试修复此问题?
编辑:使用命令--trace
:
cap -T
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:304:in `set_arg_names'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:29:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:360:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:32:in `task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:196:in `in_namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:104:in `namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:7:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `<top (required)>'
/home/dirtymike/public_html/project/Capfile:3:in `load'
/home/dirtymike/public_html/project/Capfile:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `<main>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
答案 0 :(得分:0)
修改的
这在Gem版本0.0.7中得到修复。我提交了一个补丁,它现在强制到Capistrano 2.X,这是唯一的兼容版本。最初的答案是错的,问题不在于Rake。
原始答案
似乎问题出在Rake而不是Capistrano上。您可能需要使用较旧版本的rake(可能是0.9.6),或更新Magentify gem以使用rake 10.也许您可以在该repo上打开一个问题。
修改
确认:它适用于rake 0.9.6。
您可以将此Gemfile添加到项目中:
source 'http://rubygems.org'
gem 'rake', '~> 0.9'
gem 'magentify'
然后像bundle exec cap -T