我的Centos 7的rbenv位于/root/.rbenv中,但当我运行cap production deploy:setup_config时,它会在/usr/local/rbenv中搜索rbenv。
错误消息
DEBUG [6a1407a4] Running /usr/bin/env [ -d /usr/local/rbenv/versions/2.2.0 ] as root@111.111.111.11
DEBUG [6a1407a4] Command: [ -d /usr/local/rbenv/versions/2.2.0 ]
DEBUG [6a1407a4] Finished in 6.403 seconds with exit status 1 (failed).
ERROR rbenv: 2.2.0 is not installed or not found in /usr/local/rbenv/versions/2.2.0.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)" Gemfile
# Use Capistrano for deployment
group :development do
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rbenv', github: "capistrano/rbenv"
end卡普
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rbenv'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
Dir.glob('lib/capistrano/*/*.rb').each { |r| import r }rbenv应该在/usr/local/里面吗?卡皮斯特拉诺的配置有问题吗?我在deploy.rb中搜索过,在lib/capistrano/*中搜索过任务,但没有找到/usr/local/的引用。
我对Capistrano设置的引用来自于这个git。
发布于 2015-03-03 21:50:17
你在这条线的问题。您应该为:user变量指定rbenv_type值,因为您已经在用户目录中安装了rbenv。
https://stackoverflow.com/questions/28842301
复制相似问题