Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError: cannot load such file after updating from 3.6.1 to 3.15.0 #2079

Open
murtyk opened this issue Feb 18, 2021 · 1 comment
Open

LoadError: cannot load such file after updating from 3.6.1 to 3.15.0 #2079

murtyk opened this issue Feb 18, 2021 · 1 comment

Comments

@murtyk
Copy link

murtyk commented Feb 18, 2021

Deployments were working fine for several years with 3.6.1. As part of trying Ruby 3.0 migration we upgraded capistrano to 3.15.0 and getting the following error during deploy:

LoadError: cannot load such file -- capistrano/git

Capfile has:

require "capistrano/setup"
require "capistrano/multiconfig"
require "capistrano/deploy"
require "capistrano/scm"
require "capistrano/git"
require "capistrano/bundler"
require "whenever/capistrano"
require "time"
require "capistrano/scm/git"

We also tried by removing require "capistrano/git" and including:
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

But with this we are getting:
cannot load such file -- capistrano/default-git.rb

Are we supposed to make some changes to Capfile when upgrading to 3.15.0?

@mattbrictson
Copy link
Member

Your Capfile should start like this, in this order:

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

# The rest of your custom config can go here:
require "capistrano/bundler"
require "whenever/capistrano"
require "time"

You can refer to the upgrade guide: https://github.com/capistrano/capistrano/blob/master/UPGRADING-3.7.md

You can also refer to the Capfile template that ships with 3.15.0: https://github.com/capistrano/capistrano/blob/v3.15.0/lib/capistrano/templates/Capfile

I see you have require "capistrano/multiconfig" before many of the standard capistrano require statements. I do not know what that does. It is not an official capistrano project. Perhaps it is not compatible with 3.15.0? You might want to check with its maintainers: https://github.com/railsware/capistrano-multiconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants