Install on Debian as deb package but use mysql instead of postgresql


  • Used Zammad version: 3.6
  • Used Zammad installation source: debian package
  • Operating system: Debian Buster 10
  • Browser + version:

I want to install zammad as a debian package but want to use MySQL instead of postgresql. I found this thread: Install on Ubuntu via DEB with MySQL not Postgres - #3 by MrGeneration
and I did this:

  • install debian 10, update
  • install elasticsearch
  • install mysql package and create users and grants
  • install zammad package

apt installed postgresql and I think it also put the migration there. Mysql was empty.

So I changed /opt/zammad/config/database.yml, adapter is now mysql2 and I checked username, database name and password.
Then I ran zammad run rake db:create and I got this:

root@zammad2:/opt/zammad# zammad run rake db:create
rake aborted!
LoadError: Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? cannot open shared object file: No such file or directory - /opt/zammad/vendor/bundle/ruby/2.6.
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `required

How do I get missing files installed? Iā€™m used to PHP Composer and understand that bundle is kind of the same thing for ruby. But I have no idea where and under which user I should run bundler.

OK, got it by myself: apt install ruby-mysql2 and apt reinstall zammad did the trick. The reinstallation works because apt will not overwrite the database.yml where I have set adapter = mysql2

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.