我正在尝试按照本指南在 ubuntu(12.10)上使用 nginx、unicorn 和 capistrano 设置 rails 堆栈。我决定使用 RVM 进行 ruby 安装。
到目前为止我安装的内容:
- 所有依赖库(imagemagick、git、mysql-server 等)
- nginx (1.2.1)
- rvm (1.17) 和 ruby (1.9.2)
- 宝石:rails (3.1.6), unicorn (4.4.0), capistrano (2.13.5), ...
在本地,我进入
$ capify .
有效(在顶部提到的部署指南中,在第 8 页)
但我被困在下一部分'cap deploy:setup'(在指南上,第12页):
$ cap deploy:setup
/Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/variables.rb:26:in `set': you must specify exactly one of either a value or a block (ArgumentError)
from ./config/deploy.rb:4:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:93:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `load'
from Capfile:4:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:93:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:65:in `each'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:31:in `execute!'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/gems/capistrano-2.13.5/bin/cap:4:in `<top (required)>'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/bin/cap:19:in `load'
from /Users/chuck/.rvm/gems/ruby-1.9.2-p290@shop/bin/cap:19:in `<main>'
而且它似乎不依赖于部署:设置。
我随机尝试了一些其他 capistrano 命令,但总是收到相同的错误消息“您必须准确指定值或块之一(ArgumentError)”
有任何想法吗?