Install from source on Manjaro (Arch Linux based)

Hi!

I’m trying to install Zammad from source into a Manjaro VM.

All prerequisites are installed. I don’t know if the problem is that Ruby is “too new” (version 2.7.1p83). I must use version 2.6.6?

Bellow, console output.

██████████████████  ████████   zammad@zammad
██████████████████  ████████   -------------
██████████████████  ████████   OS: Manjaro Linux x86_64
██████████████████  ████████   Host: VirtualBox 1.2
████████            ████████   Kernel: 5.8.11-1-MANJARO
████████  ████████  ████████   Uptime: 1 hour
████████  ████████  ████████   Packages: 1105 (pacman)
████████  ████████  ████████   Shell: bash 5.0.18
████████  ████████  ████████   Resolution: 1280x800
████████  ████████  ████████   CPU: Intel i7-9750H (4) @ 2.592GHz
████████  ████████  ████████   GPU: VirtualBox Graphics Adapter
████████  ████████  ████████   Memory: 1707MiB / 3935MiB
████████  ████████  ████████
████████  ████████  ████████



[zammad@zammad ~]$ echo $PATH
/opt/zammad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
[zammad@zammad ~]$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
[zammad@zammad ~]$ gem -v
3.1.4
[zammad@zammad ~]$ gem install bundler rake rails
Fetching bundler-2.1.4.gem
WARNING:  You don't have /opt/zammad/.gem/ruby/2.7.0/bin in your PATH,
          gem executables will not run.
Successfully installed bundler-2.1.4
Fetching rake-13.0.1.gem
Successfully installed rake-13.0.1
Fetching activesupport-6.0.3.3.gem
Fetching concurrent-ruby-1.1.7.gem
Fetching i18n-1.8.5.gem
Fetching thread_safe-0.3.6.gem
Fetching tzinfo-1.2.7.gem
Fetching minitest-5.14.2.gem
Fetching zeitwerk-2.4.0.gem
Fetching rack-2.2.3.gem
Fetching rack-test-1.1.0.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.10.gem
Fetching crass-1.0.6.gem
Fetching rails-html-sanitizer-1.3.0.gem
Fetching rails-dom-testing-2.0.3.gem
Fetching actionview-6.0.3.3.gem
Fetching loofah-2.7.0.gem
Fetching activemodel-6.0.3.3.gem
Fetching builder-3.2.4.gem
Fetching erubi-1.9.0.gem
Fetching activejob-6.0.3.3.gem
Fetching activerecord-6.0.3.3.gem
Fetching globalid-0.4.2.gem
Fetching actionpack-6.0.3.3.gem
Fetching mini_mime-1.0.2.gem
Fetching mail-2.7.1.gem
Fetching actionmailer-6.0.3.3.gem
Fetching nio4r-2.5.4.gem
Fetching websocket-extensions-0.1.5.gem
Fetching websocket-driver-0.7.3.gem
Fetching actioncable-6.0.3.3.gem
Fetching mimemagic-0.3.5.gem
Fetching marcel-0.3.3.gem
Fetching activestorage-6.0.3.3.gem
Fetching actionmailbox-6.0.3.3.gem
Fetching actiontext-6.0.3.3.gem
Fetching thor-1.0.1.gem
Fetching rails-6.0.3.3.gem
Fetching method_source-1.0.0.gem
Fetching railties-6.0.3.3.gem
Fetching sprockets-4.0.2.gem
Fetching sprockets-rails-3.2.2.gem
Successfully installed concurrent-ruby-1.1.7

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Successfully installed i18n-1.8.5
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.7
Successfully installed minitest-5.14.2
Successfully installed zeitwerk-2.4.0
Successfully installed activesupport-6.0.3.3
Successfully installed rack-2.2.3
Successfully installed rack-test-1.1.0
Successfully installed mini_portile2-2.4.0
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.10
Successfully installed crass-1.0.6
Successfully installed loofah-2.7.0
Successfully installed rails-html-sanitizer-1.3.0
Successfully installed rails-dom-testing-2.0.3
Successfully installed builder-3.2.4
Successfully installed erubi-1.9.0
Successfully installed actionview-6.0.3.3
Successfully installed actionpack-6.0.3.3
Successfully installed activemodel-6.0.3.3
Successfully installed activerecord-6.0.3.3
Successfully installed globalid-0.4.2
Successfully installed activejob-6.0.3.3
Successfully installed mini_mime-1.0.2
Successfully installed mail-2.7.1
Successfully installed actionmailer-6.0.3.3
Building native extensions. This could take a while...
Successfully installed nio4r-2.5.4
Successfully installed websocket-extensions-0.1.5
Building native extensions. This could take a while...
Successfully installed websocket-driver-0.7.3
Successfully installed actioncable-6.0.3.3
Successfully installed mimemagic-0.3.5
Successfully installed marcel-0.3.3
Successfully installed activestorage-6.0.3.3
Successfully installed actionmailbox-6.0.3.3
Successfully installed actiontext-6.0.3.3
Successfully installed thor-1.0.1
Successfully installed method_source-1.0.0
Successfully installed railties-6.0.3.3
Successfully installed sprockets-4.0.2
Successfully installed sprockets-rails-3.2.2
Successfully installed rails-6.0.3.3
43 gems installed
[zammad@zammad ~]$ /opt/zammad/.gem/ruby/2.7.0/bin/bundle install --without test development mysql
Traceback (most recent call last):
        2: from /opt/zammad/.gem/ruby/2.7.0/bin/bundle:23:in `<main>'
        1: from /usr/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /opt/zammad/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
[zammad@zammad ~]$ gem install bundler:1.17.3
Fetching bundler-1.17.3.gem
WARNING:  You don't have /opt/zammad/.gem/ruby/2.7.0/bin in your PATH,
          gem executables will not run.
Successfully installed bundler-1.17.3
1 gem installed
[zammad@zammad ~]$ /opt/zammad/.gem/ruby/2.7.0/bin/bundle install --without test development mysql
Following files may not be writable, so sudo is needed:
  /usr/bin
  /usr/lib/ruby/gems/2.7.0
  /usr/lib/ruby/gems/2.7.0/gems
  /usr/lib/ruby/gems/2.7.0/specifications
Your Ruby version is 2.7.1, but your Gemfile specified 2.6.6
[zammad@zammad ~]$ sudo /opt/zammad/.gem/ruby/2.7.0/bin/bundle install --without test development mysql
[sudo] password for zammad:
Traceback (most recent call last):
        2: from /opt/zammad/.gem/ruby/2.7.0/bin/bundle:23:in `<main>'
        1: from /usr/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /opt/zammad/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
[zammad@zammad ~]$

I think I found my answer…

After install asdf, I used asdf plugin add ruby && asdf install ruby 2.6.6 && asdf global ruby 2.6.6 to setup Ruby 2.6.6 and now I can continue with my tests.

:nerd_face:

1 Like

Yes, the correct ruby version is mandatory and no suggestion. :stuck_out_tongue:

Thanks @MrGeneration!

I removed the latest ruby, installed Ruby 2.6.6, made some aliases and then proceeded with “install from source” directions.

sudo pacman -R ruby ruby-irb ruby-reline rubygems
sudo pacman -S ruby2.6
sudo ln -s /opt/ruby2.6/bin/ruby-2.6 /usr/bin/ruby
sudo ln -s /opt/ruby2.6/bin/gem-2.6 /usr/bin/gem
sudo ln -s /opt/ruby2.6/bin/irb-2.6 /usr/bin/irb
sudo ln -s /opt/ruby2.6/bin/bundle /usr/bin/bundle

Everything went fine except for the last part, “Starting servers with Systemd”.

I can’t figure myself what’s the problem. If I start servers manually, no problem.

Also there is a minor typo, "cd scripts/systemd" must be "cd script/systemd".

zammad@host $ cd script/systemd
zammad@host $ sudo ./install-zammad-systemd-services.sh

Do you have any idea what could be the problem? Manjaro is one the best distros, would be great if we had a package of Zammad for Manjaro/Arch Linux in AUR. :grin:

I started again, from scratch.

After all dependencies are ready, I started servers manually using:

zammad@nitro $ rails s -p 3000
zammad@nitro $ script/websocket-server.rb start
zammad@nitro $ script/scheduler.rb start

Then I accessed http://nitro:3000 and done the initial configuration. Everything seems fine.

Rebooted the system and then:

[zammad@nitro ~]$ cd /opt/zammad/script/systemd && sudo ./install-zammad-systemd-services.sh && cd
Created symlink /etc/systemd/system/multi-user.target.wants/zammad.service → /etc/systemd/system/zammad.service.
[zammad@nitro ~]$
[zammad@nitro ~]$ sudo systemctl status zammad
● zammad.service - Zammad
     Loaded: loaded (/etc/systemd/system/zammad.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2020-10-15 17:04:03 -03; 1min 10s ago
   Main PID: 1473 (sleep)
      Tasks: 1 (limit: 19051)
     Memory: 152.0K
     CGroup: /system.slice/zammad.service
             └─1473 /bin/sleep infinity

out 15 17:04:03 nitro systemd[1]: Started Zammad.
[zammad@nitro ~]$

Now Zammad doesn’t work anymore… :neutral_face:

Where can I start looking for the problem?

Sorry, but our packager service does not provide support for said operation system:


The production log file (or syslog) might be the best catch.
Normally this happens if your database is not available.

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