gpt4 book ai didi

ruby - Capistrano 示例错误 - undefined symbol 'map' 为 :hosts symbol

转载 作者:数据小太阳 更新时间:2023-10-29 08:04:14 26 4
gpt4 key购买 nike

我一直在尝试从链接运行基本的 capistrano 示例:

https://github.com/capistrano/capistrano/wiki/2.x-Getting-Started

task :search_libs, :hosts => "www.capify.org" do
run "ls -x1 /usr/lib | grep -i xml"
end

我保存在一个名为 capfile 的文件中,

$ cap capfile

并得到以下错误:

➜  capistrano  cap --trace capfile
cap aborted!
NameError: undefined local variable or method `tasks_without_stage_dependency' for #<Capistrano::Application:0x007ff1734c8e40>
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/capistrano-3.2.1/lib/capistrano/application.rb:24:in `top_level_tasks'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:106:in `block in top_level'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:100:in `top_level'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:78:in `block in run'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/rake-10.2.2/lib/rake/application.rb:75:in `run'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/capistrano-3.2.1/lib/capistrano/application.rb:15:in `run'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/gems/capistrano-3.2.1/bin/cap:3:in `<top (required)>'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/bin/cap:23:in `load'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/bin/cap:23:in `<main>'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/Dhruv/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'

我的ruby版本:ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]Cap 版本:Capistrano 版本:3.2.1(Rake 版本:10.2.2)

最佳答案

您提供的文档适用于 Capistrano v2,请使用新的 http://capistranorb.com/

在您的情况下,您需要来自 http://capistranorb.com/documentation/getting-started/preparing-your-application 的第 4 步

关于ruby - Capistrano 示例错误 - undefined symbol 'map' 为 :hosts symbol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23402155/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com