Giter Club home page Giter Club logo

Comments (5)

adamcooke avatar adamcooke commented on May 26, 2024 1

I have reverted a change I made this afternoon which means you might actually need to run it three times rather than twice for the workaround.

I accidentally pushed some changes earlier to main rather than a v3 branch. I have reverted the changes and created the branch.

from postal.

adamcooke avatar adamcooke commented on May 26, 2024

There does seem to be a small bug here. If you re-run the upgrade command it might work. I will work on a fix now. Let me know if that helps.

from postal.

jamel-hrt avatar jamel-hrt commented on May 26, 2024

Hi @adamcooke
I just tried to execute the upgrade command multiple times.

root@postal-01:/opt/postal/config# postal upgrade
warning: redirecting to https://github.com/postalserver/install/
From https://postalserver.io/start/install
 * branch            main       -> FETCH_HEAD
Already up to date.
No version specified, using latest available version...
Upgrading to 2.3.1
[+] Running 5/5
 ⠿ cron Pulled  0.6s
 ⠿ requeuer Pulled. 0.6s
 ⠿ web Pulled. 0.6s
 ⠿ smtp Pulled. 0.5s
 ⠿ worker Pulled. 0.6s
Migrating database
rake aborted!
Cannot load database configuration:
YAML syntax error occurred while parsing /opt/postal/app/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected whitespace or line break while scanning a tag at line 7 column 13
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/configuration_file.rb:29:in `rescue in parse'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/configuration_file.rb:21:in `parse'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/configuration_file.rb:18:in `parse'
/usr/local/bundle/gems/railties-6.1.7.6/lib/rails/application/configuration.rb:282:in `database_configuration'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/railtie.rb:221:in `block (2 levels) in <class:Railtie>'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `each'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/base.rb:315:in `<module:ActiveRecord>'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/base.rb:15:in `<top (required)>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/usr/local/bundle/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:22:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:24:in `execute'
/usr/local/bundle/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:492:in `exec'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:28:in `start'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:45:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:33:in `<top (required)>'
/opt/postal/app/bin/bundle:108:in `load'
/opt/postal/app/bin/bundle:108:in `<main>'

Caused by:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or line break while scanning a tag at line 7 column 13 (Psych::SyntaxError)
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/configuration_file.rb:24:in `parse'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/configuration_file.rb:18:in `parse'
/usr/local/bundle/gems/railties-6.1.7.6/lib/rails/application/configuration.rb:282:in `database_configuration'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/railtie.rb:221:in `block (2 levels) in <class:Railtie>'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `each'
/usr/local/bundle/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/base.rb:315:in `<module:ActiveRecord>'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/base.rb:15:in `<top (required)>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/usr/local/bundle/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/usr/local/bundle/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:22:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:24:in `execute'
/usr/local/bundle/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:492:in `exec'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:28:in `start'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:45:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:33:in `<top (required)>'
/opt/postal/app/bin/bundle:108:in `load'
/opt/postal/app/bin/bundle:108:in `<main>'
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)

Thank you for your support

from postal.

adamcooke avatar adamcooke commented on May 26, 2024

Check your postal config file to make sure it is properly formatted and includes the correct configuration. Looks like something, somewhere there isn't quite right.

from postal.

jamel-hrt avatar jamel-hrt commented on May 26, 2024

I found the problem.

There was a "!" character in the postal user password to join the database.
I changed the password in Mysql and the upgrade worked well.
This autogenerated password was not a problem in the past.

from postal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.