Your Ruby version is 3.1.3, but your Gemfile specified 2.7.4


  • Used Zammad version: 6.2
  • Used Zammad installation type: (source)
  • Operating system: Ubuntu 22.04
  • Browser + version: Chrome

Expected behavior:

Restoring Zammad on new system (migration).

Actual behavior:

  • I try use restore script as described in the documentation . But at end en of process, I get an error “Your Ruby version is 3.1.3, but your Gemfile specified 2.7.4”.

Steps to reproduce the behavior:

  • systemctl stop zammad
    cd /opt/zammad/contrib/backup/

Zammad restore started - Do 4. Apr 13:34:53 UTC 2024!

The restore will delete your current database!
Be sure to have a backup available!

Please ensure to have twice the storage of the uncompressed backup size!

Note that the restoration USUALLY requires root permissions as services are stopped!

Enter ‘yes’ if you want to proceed!
Restore?: yes
Enter file date to restore:
File date: 20240403092606
Enter db date to restore:
DB date: 20240403092606
Stopping Zammad
Checking requirements
… Dropping current database zammad
Dropped database ‘zammad’
… Creating database zammad for owner zammad
Restoring PostgreSQL DB
Restoring Files
Ensuring correct file permissions …
Clearing Cache …
Your Ruby version is 3.1.3, but your Gemfile specified 2.7.4
./ line 37: t_restore_message: command not found#

/opt/zammad/contrib/backup# ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

I will be very grateful if someone can help me.

Has anyone else encountered this problem ?

You’re restoring a full filesystem dump of Zammad and this causes the issue. The documentation has clear suggestions to not do that (see: Backup configuration — Zammad System Documentation documentation)

The migration guide even tells you and gives you clear instructions on what to do if you do a full restore: