Khi tôi chạy một kịch bản triển khai, tôi có lỗi:rbenv: phiên bản '2.2.3' không được cài đặt (do biến môi trường RBENV_VERSION)
[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 [email protected]: Exception while executing as [email protected]: 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 [email protected]: 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 [email protected]: Exception while executing as [email protected]: 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
có set :rbenv_ruby, '2.2.3'
Server và tại địa phương tôi đã cài đặt ruby 2.2.3p173
Thay đổi giá trị từ 2.2.3
thành 2.2.3p173
cho set :rbenv_ruby
không hoạt động.
Xin chào! Thật không may, chỉ cần thêm 'set: rbenv_path' vào' Capfile' không hoạt động đối với tôi. Cảm ơn vì đã dành thời gian cho tôi. – Askar
Điều này phải ở trong deploy.rb, không phải Capfile. –
Vâng, tôi đã làm việc khi tôi chuyển sang 'deploy.rb'. – Askar