为什么capistrano检查不存在rbenv目录?

时间:2014-04-30 21:51:34

标签: testing capistrano

我在capistrano 3中运行cap production deploy时收到以下消息。

DEBUG [5021b4ce] Running /usr/bin/env [ ! -d /usr/local/rbenv/versions/2.0.0-p451 ] on example.com
DEBUG [5021b4ce] Command: [ ! -d /usr/local/rbenv/versions/2.0.0-p451 ]
DEBUG [5021b4ce] Finished in 0.853 seconds with exit status 1 (failed).

这是rbenv config/deploy.rb的一部分。

set :rbenv_type, :system # or :user, depends on your rbenv setup
set :rbenv_ruby, '2.0.0-p451'
set :rbenv_path, '/usr/local/rbenv'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value

我认为Capistrano应该检查rbenv目录的存在。 为什么命令是[ ! -d #{rbenv_dir}]而不是[ -d #{rbenv_dir}]

0 个答案:

没有答案