[英]VPS rbenv location directory is wrong when using Capistrano3
My Centos 7 has rbenv located in /root/.rbenv
, but when I run cap production deploy:setup_config
it searches rbenv inside /usr/local/rbenv
. 我的Centos 7在/root/.rbenv中有/root/.rbenv
,但是当我运行cap production deploy:setup_config
它会在/usr/local/rbenv
搜索/usr/local/rbenv
。
Error Message 错误信息
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 .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 的Gemfile
# Use Capistrano for deployment
group :development do
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rbenv', github: "capistrano/rbenv"
end
Capfile Capfile
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 }
Is rbenv supposed to be inside /usr/local/
? rbenv应该位于/usr/local/
吗? Is something wrong in the configuration of the Capistrano? Capistrano的配置有问题吗? I've searched inside deploy.rb and the tasks inside lib/capistrano/*
, but I found no reference of /usr/local/
. 我已经搜索了deploy.rb和lib/capistrano/*
的任务,但是没有找到/usr/local/
引用。
My references of the Capistrano setup are from this git . 我对Capistrano设置的引用来自此git 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.