cap生产部署'rvm ruby​​ ...'错误

时间:2017-09-16 10:22:42

标签: ruby-on-rails amazon-web-services capistrano capistrano3

说实话,我不知道错误是什么。 我的机器正确地验证了服务器,但每次运行cap production deploy命令我都会收到以下错误,我尝试了所有但无法解决此错误。

请帮忙!

错误:

ankush@freakuency:~/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 deploy@52.14.138.122: 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, 'git@gitlab.com: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

1 个答案:

答案 0 :(得分:1)

似乎capistrano-rvm不再被维护(详情here),最新的Capistrano打破了这个宝石。您可以使用rbenv代替rvm或使用rvm自己维护的rvm1-capistrano3