Description
Describe the bug
I have switched to Ruby 3.1.2 from a version of Ruby 2 (which I have problem re-installing on MacOs) and have problems running wordmove 5.2.2. For example
wordmove doctor first generates a warning:
Calling
DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead.
The crashes with error:
/Users/christer/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:323:in `safe_load': wrong number of arguments (given 4, expected 1) (ArgumentError)
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/movefile.rb:31:in `fetch'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/doctor/movefile.rb:11:in `initialize'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/doctor.rb:13:in `new'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/doctor.rb:13:in `movefile'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/doctor.rb:5:in `start'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:17:in `doctor'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/exe/wordmove:6:in `<top (required)>'
from /Users/christer/.rbenv/versions/3.1.2/bin/wordmove:25:in `load'
from /Users/christer/.rbenv/versions/3.1.2/bin/wordmove:25:in `<main>'
Seeing the error message "wrong number of commands" I made a patch in movefile.rb line 31:
Was:
YAML.safe_load(ERB.new(File.read(found)).result, [], [], true).deep_symbolize_keys!
Changed into:
YAML.safe_load(ERB.new(File.read(found)).result).deep_symbolize_keys!
wordmove doctor now runs withour errors and I can now push plugins, themes, uploads to the production site, but wordmove crashes when I try to push the database with the following error message:
/Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/openssl.rb:152:in `public_key=': pkeys are immutable on OpenSSL 3.0 (OpenSSL::PKey::PKeyError)
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/openssl.rb:152:in `read_keyblob'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/buffer.rb:325:in `read_keyblob'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/buffer.rb:248:in `read_key'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:148:in `block (2 levels) in keys_for'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:132:in `each_line'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:132:in `block in keys_for'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:131:in `open'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:131:in `keys_for'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:61:in `block in search_in'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:61:in `each'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:61:in `flat_map'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:61:in `search_in'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/known_hosts.rb:55:in `search_for'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:98:in `host_keys'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:277:in `prepare_preferred_algorithms!'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:153:in `initialize'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:88:in `new'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:88:in `initialize'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `new'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `start'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:71:in `session'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:44:in `exec!'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:6:in `backup_remote_db!'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:37:in `push_db'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:116:in `block in push'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:40:in `block in handle_options'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:in `each'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:in `handle_options'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:115:in `push'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
from /Users/christer/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wordmove-5.2.2/exe/wordmove:6:in `<top (required)>'
from /Users/christer/.rbenv/versions/3.1.2/bin/wordmove:25:in `load'
from /Users/christer/.rbenv/versions/3.1.2/bin/wordmove:25:in `<main>'
Maybe I would need to modify the wordmove.gemspec file to update other gems?
Wordmove command
wordmove push -e production -d
Expected behavior
A clear and concise description of what you expected to happen.
movefile.yml
Paste (removing personal data) the interesting part, if any, of your
movefile.yml
formatting it inside a code block withyml
syntax and double checking the indentation.
Exception/trace
Paste (removing personal data) the entire trace of error/exception you encountered, if any
Environment (please complete the following information):
- OS: Mac OS Ventura 13.6.4
- Ruby: 3.1.2
- Wordmove: 5.2.2
Doctor
- running the
wordmove doctor
command returns all green