[英]rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
運行部署腳本時,出現錯誤:
[cb123fad] rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
DEBUG [cb123fad]
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@xx.xx.xx.xx: Exception while executing as deploy@xx.xx.xx.xx: bundle exit status: 1
bundle stdout: rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
bundle stderr: Nothing written
SSHKit::Runner::ExecuteError: Exception while executing as deploy@xx.xx.xx.xx: bundle exit status: 1
bundle stdout: rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
bundle stderr: Nothing written
SSHKit::Command::Failed: bundle exit status: 1
bundle stdout: rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
bundle stderr: Nothing written
Tasks: TOP => deploy:initial
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@xx.xx.xx.xx: Exception while executing as deploy@xx.xx.xx.xx: bundle exit status: 1
bundle stdout: rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)
bundle stderr: Nothing written
Capfile
已將set :rbenv_ruby, '2.2.3'
服務器和本地我已經安裝了ruby 2.2.3p173
從值更改2.2.3
到2.2.3p173
為set :rbenv_ruby
沒有工作。
我解決了相同的問題設置:rbenv_path
。 您應該是:
set :rbenv_path, '/home/your/.rbenv/'
這必須在deploy.rb
內部。
上面的答案對我不起作用。 gem update --system
,然后bundle install
將導致fatal: No live threads left. Deadlock?
fatal: No live threads left. Deadlock?
錯誤。
bundle exec cap development deploy
如果已設置 gem 'sshkit', '~> 1.7.1'
則完成部署。
但是,可能會發生sshkit
gem可能更新為1.8.0
或更高版本的情況。 在這種情況下,假設在deploy.rb中設置了標准的Ubuntu服務器
set :rbenv_path, '$HOME/.rbenv'
將允許部署完成。
https://github.com/capistrano/sshkit/issues/303和https://github.com/capistrano/rbenv/pull/59
筆記
set :rbenv_path, '/home/your/.rbenv/' # works
set :rbenv_path, '~your/.rbenv/' # doesn't work
由於sshkit的更改而創建了此問題。
diff --git a/Gemfile.lock b/Gemfile.lock
index b85dabe..a909ee0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -57,6 +57,7 @@ GEM
code_metrics (0.1.3)
coderay (1.1.0)
colored (1.2)
+ colorize (0.7.7)
concord (0.1.5)
adamantium (~> 0.2.0)
equalizer (~> 0.0.9)
@@ -215,7 +216,8 @@ GEM
slop (3.6.0)
spoon (0.0.4)
ffi
- sshkit (1.8.1)
+ sshkit (1.7.1)
+ colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
terminal-table (1.5.2)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.