0

非常诚实,我不知道错误是什么。 我的机器被正确地认证到服务器,但每次运行cap production deploy命令时出现以下错误,我尝试了一切,但无法解决此错误。瓶盖生产部署'rvm ruby​​ ...'错误

请帮忙!

错误:

[email protected]:~/Desktop/work$ cap production deploy 
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io] 
ruby-2.3.1 
(Backtrace restricted to imported tasks) 
cap aborted! 
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: ruby exit status: 1 
ruby stdout: Please note that `rvm ruby ...` was removed, try `ruby 2.3.1p112 do ruby --version` or `rvm all do ruby 2.3.1p112 do ruby --version` instead. 
Run `rvm help` to see usage information 
ruby stderr: Nothing written 

SSHKit::Command::Failed: ruby exit status: 1 
ruby stdout: Please note that `rvm ruby ...` was removed, try `ruby 2.3.1p112 do ruby --version` or `rvm all do ruby 2.3.1p112 do ruby --version` instead. 
Run `rvm help` to see usage information 
ruby stderr: Nothing written 

Tasks: TOP => rvm:check 
(See full trace by running task with --trace) 

`

deploy.rb:

lock "3.9.1" 

set :application, 'pecul' 
set :repo_url, '[email protected]:peculcommunity/Pecul.git' # Edit this to match your repository 
set :branch, :master 
set :deploy_to, '/home/deploy/pecultest' 
set :pty, true 
set :linked_files, %w{config/database.yml config/application.yml} 
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads} 
set :keep_releases, 5 
set :rvm_type, :user 
set :rvm_ruby_version, 'ruby 2.3.1p112' 

set :puma_rackup, -> { File.join(current_path, 'config.ru') } 
set :puma_state, "#{shared_path}/tmp/pids/puma.state" 
set :puma_pid, "#{shared_path}/tmp/pids/puma.pid" 
set :puma_bind, "unix://#{shared_path}/tmp/sockets/puma.sock" #accept array for multi-bind 
set :puma_conf, "#{shared_path}/puma.rb" 
set :puma_access_log, "#{shared_path}/log/puma_error.log" 
set :puma_error_log, "#{shared_path}/log/puma_access.log" 
set :puma_role, :app 
set :puma_env, fetch(:rack_env, fetch(:rails_env, 'production')) 
set :puma_threads, [0, 8] 
set :puma_workers, 0 
set :puma_worker_timeout, nil 
set :puma_init_active_record, true 
set :puma_preload_app, false 
+0

您是否在deploy.rb中设置了rvm_ruby_version? – Mohanraj

+0

是的,让我在我的问题中加上 –

回答

1

看来capistrano-rvm没有被维护了(详情here)和最新的Capistrano的打破这种宝石。您可以使用rbenv而不是rvm或使用rvm1-capistrano3本身由rvm维护。