welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

no implicit conversion of Symbol into Integer (TypeError) #449

Closed nailbrain closed 6 years ago

nailbrain commented 6 years ago

I'm getting the following error when using the command: wordmove pull -all

Any idea what the problem might be?

Many thanks!

▬▬ ✓ Using Movefile: ./Movefile ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
/Users/brettgolding/.rvm/gems/ruby-2.4.2/gems/wordmove-2.1.3/lib/wordmove/deployer/base.rb:22:in `[]': no implicit conversion of Symbol into Integer (TypeError)
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/gems/wordmove-2.1.3/lib/wordmove/deployer/base.rb:22:in `deployer_for'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/gems/wordmove-2.1.3/lib/wordmove/cli.rb:63:in `pull'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2@global/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2@global/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2@global/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2@global/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/gems/wordmove-2.1.3/exe/wordmove:6:in `<top (required)>'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/bin/wordmove:23:in `load'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/bin/wordmove:23:in `<main>'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/brettgolding/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'
nailbrain commented 6 years ago

My config file:

  global:
  sql_adapter: "wpcli"

local:
  vhost: "localhost:8888"
  wordpress_path: "/Users/brettgolding/Google Drive/htdocs/brett-dev-rebuild" # use an absolute path here

  database:
    name: "brettdevrebuild"
    user: "root"
    password: "root"
    host: "localhost"

production:
  vhost: "http://box5159.temp.domains/~brettdev/"
  wordpress_path: "/home1/brettdev/public_html/" # use an absolute path here

  database:
    name: "brettdev_brettdev"
    user: "brettdev_brett"
    password: "password"
    host: "localhost"
    # port: "3308" # Use just in case you have exotic server config
    # mysqldump_options: "--max_allowed_packet=1G" # Only available if using SSH

  exclude:
    - "askchiangmai"
    - "output"
    - "brettdev"
    - ".htaccess"
    - "valueinspiration"
    - "datascience"
    - ".git/"
    - ".gitignore"
    - ".sass-cache/"
    - "node_modules/"
    - "bin/"
    - "tmp/*"
    - "Gemfile*"
    - "Movefile"
    - "wp-config.php"
    - "wp-content/*.sql.gz"

  # paths: # you can customize wordpress internal paths
  #   wp_content: "wp-content"
  #   uploads: "wp-content/uploads"
  #   plugins: "wp-content/plugins"
  #   mu_plugins: "wp-content/mu-plugins"
  #   themes: "wp-content/themes"
  #   languages: "wp-content/languages"

  ssh:
    host: "162.241.224.50"
    user: "brettdev"
  #   password: "password" # password is optional, will use public keys if available.
  #   port: 22 # Port is optional
  #   rsync_options: "--verbose" # Additional rsync options, optional
  #   gateway: # Gateway is optional
  #     host: "host"
  #     user: "user"
  #     password: "password" # password is optional, will use public keys if available.

  # ftp:
  #  user: "brettdevcom"
  #  password: "password"
  #  host: "ftp.ipage.com"
  #  passive: true
  #  scheme: "ftp" # default "ftp"

# staging: # multiple environments can be specified
#   [...]
alessandro-fazzi commented 6 years ago

Hi @nailbrain ,

firstly what wordmove doctor tells to you?

alessandro-fazzi commented 6 years ago

@nailbrain any news?

By the way in your snippet global key in movefile has a wrong indentation.

alessandro-fazzi commented 6 years ago

No news good news :)

tameroski commented 4 years ago

Just for the record : i encountered the very same error, and it's obviously a movefile.yml syntax issue.

In my case, it was because i was trying to read an old movefile with oldschool hooks like this :

    hooks:
        push:
            before:
                local:
                    - 'command 1'
                    - 'command 2'

Instead of this :

    hooks:
        push:
            before:
                - command: 'command 1'
                  where: local
                - command: 'command 2'
                  where: local