Fallo en la actualización de v3.0.1 a v3.0.2

Aquí está el mensaje.
I, [2023-03-23T15:14:16.270826 #1] INFO – :

cd /var/www/discourse && su discourse -c ‘bundle install --deployment --retry 3 --jobs 4 --verbose --without test development’
[DEPRECATED] El indicador --deployment está obsoleto porque depende de que se recuerde entre invocaciones de bundler, lo que bundler ya no hará en versiones futuras. En su lugar, usa bundle config set --local deployment 'true', y deja de usar este indicador.
[DEPRECATED] El indicador --without está obsoleto porque depende de que se recuerde entre invocaciones de bundler, lo que bundler ya no hará en versiones futuras. En su lugar, usa bundle config set --local without 'test development', y deja de usar este indicador.

Bundler::InstallError: web-push-3.0.0 requiere ruby version >= 3.0, que es incompatible con la versión actual, 2.7.6
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/installer.rb:233:in block in ensure_specs_are_compatible!' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:155:in each’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:155:in each' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/installer.rb:231:in ensure_specs_are_compatible!’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/installer.rb:83:in block in run' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:12:in block in lock’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:9:in open' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:9:in lock’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/installer.rb:71:in run' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/installer.rb:23:in install’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/cli/install.rb:62:in run' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:260:in block in install’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/settings.rb:131:in temporary' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:259:in install’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:34:in dispatch’
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:28:in start’



Buscando gems [“powerbar”, “middleware”, “pattern-match”, “coffee-script-source”, “virtus”, “needle”, “jruby-pageant”, “bcrypt_pbkdf”, “rbnacl”, “rbnacl-libsodium”]
HTTP GET https://index.rubygems.org/info/middleware
HTTP 200 OK https://index.rubygems.org/info/middleware
Buscando gems [“ansi”, “descendants_tracker”, “axiom-types”, “coercible”, “equalizer”]
Buscando gems [“ice_nine”, “adamantium”]
Buscando gems [“memoizable”]

FALLIDO

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle install --deployment --retry 3 --jobs 4 --verbose --without test development’ falló con el retorno #<Process::Status: pid 324 exit 5>
Ubicación del fallo: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn’
exec falló con los parámetros {“cd”=>“$home”, “hook”=>“bundle_exec”, “cmd”=>[“su discourse -c ‘bundle install --deployment --retry 3 --jobs 4 --verbose --without test development’”]}
bootstrap falló con el código de salida 5
FALLO AL INICIAR por favor desplázate hacia arriba y busca mensajes de error anteriores, puede haber más de uno.
./discourse-doctor puede ayudar a diagnosticar el problema.
58f4a7f8ec4aa127e0b28260dd525155e6d18554aa5a8bbd4b8036374e5b2fe5
make: *** [Makefile:44: build] Error 1

¿Cómo podemos actualizar la versión de ruby a >3.0?

¿Qué tipo de instalación tienes? No parece una instalación estándar.

Tengo entendido que una instalación estándar se puede actualizar por línea de comandos, aunque podría requerir dos intentos. Si te quedas atascado con una versión incorrecta de ruby, tienes una configuración inusual.

1 me gusta

¿Puedes intentar una reconstrucción desde la línea de comandos?

1 me gusta

Aquí está mi archivo app.yml.

templates:
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/weekly.report.template.yml"
nginx,

params:
  version: stable

env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  DISCOURSE_HOSTNAME: 'XXXXXX.changeme.com'


  DISCOURSE_DEVELOPER_EMAILS: ''


  DISCOURSE_SMTP_ADDRESS: 127.0.0.1
  DISCOURSE_SMTP_PORT: 2525
  DISCOURSE_SMTP_ENABLE_START_TLS: false           # (opcional, por defecto true)


  DISCOURSE_DB_USERNAME: XXXXXX
  DISCOURSE_DB_PASSWORD: XXXXXXX
  DISCOURSE_DB_HOST: 172.17.0.1
  DISCOURSE_REDIS_HOST: 172.17.0.1


volumes:
  - volume:
      host: /var/discourse/shared/web-only
      guest: /shared
  - volume:
      host: /var/discourse/shared/web-only/log/var-log
      guest: /var/log

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-user-notes.git
    - exec:
        cd: $home
        cmd:
          - git fetch --tags
          - git checkout tags/v3.0.2
run:
  - exec: echo "Inicio de comandos personalizados"

  - exec:
      cmd:
        - echo "Actualizando la clave apt de Yarn"
        - "curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -"

  - exec:
      cmd:
        - echo "Añadiendo GCS-Fuse a la imagen"
        - "curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -"

  - file:
      path: /etc/apt/sources.list.d/gcsfuse.list
      contents: |
        deb http://packages.cloud.google.com/apt gcsfuse-buster main

  - exec:
      cmd:
        - apt-get -y update
        - apt-get -y install gcsfuse
        - mkdir -p /shared/bucket
        - echo "Terminado de añadir GCS-Fuse a la imagen"


  - exec:
      cmd:
        - echo "Añadiendo PostgreSQL 14 a la imagen."
        - apt-get -y update
        - apt-get -y install postgresql-14
        - pg_dropcluster 13 main

  # arreglar los parches de copias de seguridad y subidas para que apunten al bucket gcs
  - exec: ln -sf /shared/bucket/discourse/backups /var/www/discourse/public/
  - exec: ln -sf /shared/bucket/discourse/uploads /var/www/discourse/public/
  # arreglar la sincronización de los informes semanales en el bucket gcs
  - exec: ln -sf /shared/bucket/weekly_reports /var/www/discourse/public/

  # registrar en stdout, incluso en producción para el explorador de logs
  - replace:
      filename: /etc/nginx/conf.d/discourse.conf
      from: 'access_log /var/log/nginx/access.log log_discourse;'
      to: 'access_log /dev/stdout log_discourse;'

  - replace:
      filename: /var/www/discourse/config/unicorn.conf.rb
      from: 'if ENV["RAILS_ENV"] != "production"'
      to: 'if ENV["RAILS_ENV"] == "production"'
  - exec: 'echo "Rails.logger = Logger.new(STDOUT)" >> /var/www/discourse/config/application.rb'

  # arreglar rsync para gcsfuse y restauraciones (b/226700873#comment8)
  - replace:
      filename: /var/www/discourse/lib/file_store/local_store.rb
      from: "'rsync', '-a', '--safe-links', \"#{source_path}/\", \"#{upload_path}/\",'"
      to: "'rsync', '-a', '--safe-links', \"#{source_path}/\", \"#{upload_path}/\", '--inplace', '--no-times', '--update', '--no-perms', '--no-owner', '--no-group',"


  - exec: echo "Fin de los comandos personalizados"
  - exec: awk -F\\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Claves SSH autorizadas para este contenedor:"; } NF>=2 {print $NF;}'