capistrano-plugins / capistrano-ssh-doctor

Quickly troubleshoot capistrano issues related to SSH
MIT License
61 stars 13 forks source link

Please change `scm` setting to `:git`. #12

Open wonderphil opened 6 years ago

wonderphil commented 6 years ago

Hi guys,

This seems to be the same as issue #9

Maybe I am missing something but I just cant not get passed this.

Setup is: Rails Version: 5.1.6 Cap Version: 3.11.0 (Rake Version: 12.3.1) capistrano-ssh-doctor version: 1

Capfile:

require "capistrano/setup"
require "capistrano/deploy"

require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

require 'capistrano/rbenv'
require 'capistrano/rbenv_install'

require 'capistrano/bundler'
require 'capistrano/rails'

require 'capistrano/unicorn_nginx'
require 'capistrano/postgresql'

require 'capistrano/safe_deploy_to'
require 'capistrano/ssh_doctor'

Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

deploy.rb

lock "~> 3.11.0"
set :rbenv_ruby, "2.5.1"

set :application, "some_app"
set :repo_url, "git@github.com:wonderphil/some_app.git"

Gemfile

....
group :development do
  gem "capistrano", "~> 3.10"                
  gem 'capistrano-rbenv'                     
  gem 'capistrano-rbenv-install'             
  gem 'capistrano-bundler'                  
  gem 'capistrano-rails'                     
  gem 'capistrano-unicorn-nginx'             
  gem 'capistrano-postgresql'                
  gem 'capistrano-safe-deploy-to'            
  gem 'capistrano-ssh-doctor'
end
....

when I run:

$ cap production ssh:doctor
It seems you are NOT using git as a Capistrano strategy. At the moment capistrano-ssh-doctor supports only git.
Please change `scm` setting to `:git`.

If i add the scm setting i get

$ cap production ssh:doctor
[Deprecation Notice] `set :scm, :git` is deprecated.
To ensure your project is compatible with future versions of Capistrano,
remove the :scm setting and instead add these lines to your Capfile after
    `require "capistrano/deploy"`:

    require "capistrano/scm/git"
    install_plugin Capistrano::SCM::Git
It seems you are NOT using git as a Capistrano strategy. At the moment capistrano-ssh-doctor 
supports only git.
Please change `scm` setting to `:git`.

Any help?

sinankeskin commented 6 years ago

Hi. I was searching the same issue.

Actually this issue has been fixed long time ago but apparently gem has not updated.

You can simply workaround using the master branch in Gemfile as:

gem 'capistrano-ssh-doctor', git: 'https://github.com/capistrano-plugins/capistrano-ssh-doctor.git'

Megaheff commented 4 years ago

Just installed capistrano-ssh-doctor and I am getting the exact same issue as @wonderphil. I tried the above by @sinankeskin but it did not change anything. Any ideas?

sinankeskin commented 4 years ago

Hi @Megaheff

Looks like my solution still works. Use git repo for workaround.

stuckerab commented 2 years ago

I wanted to let anyone else who finds their way here, that on my Rails 7, Ruby 3.0.2 app with a current version of Capistrano (3.16) I still receive this error even if I use the master branch as described above.

jorgedx commented 10 months ago

@sinankeskin the solution still works