Я пытаюсь перенести мое приложение на мой сервер, я использую Rails 5.2 и Ruby 2.4.6 и Capistrano 3. Мое предыдущее приложение работало на стороне сервера Rails 4.2.
Когда я пытаюсь запустить cap production deploy:check --trace
и получаю:
** Invoke deploy:check:make_linked_dirs (first_time)
** Execute deploy:check:make_linked_dirs
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as username@servername: no implicit conversion of Array into String
Caused by:
TypeError: no implicit conversion of Array into String
/Users/username/.rbenv/versions/2.4.6/lib/ruby/2.4.0/pathname.rb:409:in `initialize'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/2.4.0/pathname.rb:409:in `new'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/2.4.0/pathname.rb:409:in `join'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/dsl/paths.rb:81:in `block in join_paths'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/dsl/paths.rb:81:in `map'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/dsl/paths.rb:81:in `join_paths'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/dsl/paths.rb:69:in `linked_files'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/dsl/paths.rb:73:in `linked_file_dirs'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capistrano-3.11.0/lib/capistrano/tasks/deploy.rake:81:in `block (4 levels) in <top (required)>'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/username/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:check:make_linked_dirs
Capfile:
require "capistrano/setup"
require "capistrano/deploy"
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/passenger'
require 'capistrano/rvm'
set :rvm_type, :user
set :rvm_ruby_version, '2.4.6'
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/rvm"
require "capistrano/bundler"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Gemfile:
group :development do
#Capistrano deployment gems
gem "capistrano", "~> 3.10", require: false
gem "capistrano-rails", "~> 1.4", require: false
gem 'capistrano-passenger', '~> 0.2.0'
gem 'capistrano-rvm'
Deploy:
# config valid for current version and patch releases of Capistrano
lock "~> 3.11.0"
set :application, "app"
set :repo_url, "git@github.com:repo.git"
set :branch, "master"
set :deploy_to, "/var/www/appfolder"
append :linked_files, "config/database.yml"
append :linked_files, %w{config/master.key}
# Default value for linked_dirs is []
append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', '.bundle', 'public/system', 'public/uploads'
set :keep_releases, 5
set :migration_role, :app
production.rb
server "servername", user: "deploy", roles: %w{app db web}
Я осмотрелся, но ничего не увидел, почему я не получаю неявное преобразование Array в String. Я положил что-то, чтобы выжать в connected_dirs? Если мне нужно добавить любой другой код, пожалуйста, дайте мне знать. Я не уверен, где искать этот момент.