You are not logged in.

#1 2021-04-03 13:02:48

tqre
Member
Registered: 2020-08-05
Posts: 4

[SOLVED] GitLab 13.10.1

Started testing repos on my personal GitLab and lab environment, and the 2 different ruby versions collide.

GitLab looks like to be working on upgrading to ruby 3, but it's not there yet. There are some tools in AUR that enable easy co-existence of different ruby versions, of which rbenv is recommended.

Main problem is that the database migration commands fail if ruby executable points to wrong version, as the commands use 'bundle' to do this'. I even tried to specify the gems -paths to point at 2.7.0 -versions, to no avail.

# su -u gitlab
sh-5.1$ /bin/sh -c "$(cat environment | xargs) bundle exec rake db:migrate"
/usr/lib/ruby/3.0.0/rubygems.rb:281:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
        from /usr/lib/ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'
        from /usr/bin/bundle:23:in `<main>'
sh-5.1$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.15
  - RUBY VERSION: 3.0.0 (2020-12-25 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /var/lib/gitlab/.local/share/gem/ruby/3.0.0
  - RUBY EXECUTABLE: /usr/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /usr/lib/ruby/gems/2.7.0/bin
  - SPEC CACHE DIRECTORY: /var/lib/gitlab/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/2.7.0
     - /var/lib/gitlab/.local/share/gem/ruby/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--user-install"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/bin
     - /usr/bin/site_perl
     - /usr/bin/vendor_perl
     - /usr/bin/core_perl

I got things working by uninstalling ruby 3 version that comes along with [testing], and symlinking the ruby-2.7 -binary to ruby.

# ln -svf /usr/bin/ruby-2.7 /usr/bin/ruby

The question is, how to enable peaceful co-existence of both ruby versions on a server running GitLab? Excluding Docker smile

Last edited by tqre (2021-04-06 13:29:26)

Offline

#2 2021-04-03 13:09:33

tqre
Member
Registered: 2020-08-05
Posts: 4

Re: [SOLVED] GitLab 13.10.1

Another note from [testing] affecting GitLab installations: the new redis version has it's configuration file at /etc/redis/redis.conf instead of the old /etc/redis.conf.

Last edited by tqre (2021-04-03 13:09:49)

Offline

#3 2021-04-04 10:59:09

tqre
Member
Registered: 2020-08-05
Posts: 4

Re: [SOLVED] GitLab 13.10.1

Got this working. Using ansible to deploy missed some critical pacman -messages:

Have to start using **bundle-2.7** instead of bundle!

(9/9) installing gitlab                                                                        [########################################################] 100%
warning: directory permissions differ on /var/log/gitlab/
filesystem: 770  package: 755
Configure your /etc/webapps/gitlab/gitlab.yml
Set up your redis to run on /run/redis/redis.sock or configure gitlab to use redis TCP
Put a secret bytestring to /etc/webapps/gitlab/secret
Copy /usr/share/webapps/gitlab/config/secrets.yml.example to /etc/webapps/gitlab/secrets.yml and configure it
Setup the database:
$ (cd /usr/share/webapps/gitlab && sudo -u gitlab $(cat environment | xargs) bundle-2.7 exec rake gitlab:setup)
Finally run the following commands to check your installation:
$ (cd /usr/share/webapps/gitlab && sudo -u gitlab $(cat environment | xargs) bundle-2.7 exec rake gitlab:env:info)
$ (cd /usr/share/webapps/gitlab && sudo -u gitlab $(cat environment | xargs) bundle-2.7 exec rake gitlab:check)
Optional dependencies for gitlab
    postgresql: database backend [installed]
    python-docutils: reStructuredText markup language support
    smtp-server: mail server in order to receive mail notifications
:: Running post-transaction hooks...

Offline

#4 2021-04-04 12:32:32

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] GitLab 13.10.1

Please stop multiposting. If you are the last person to post in a thread and you have something to add, use the edit button to amend your previous post.

Also, please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#5 2021-04-04 15:39:36

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED] GitLab 13.10.1

Gitlab 13.10.1 is in testing and built against ruby 3 (also in testing). If you want that specific gitlab version then you need to enable testing repos and pull all dependencies correctly. Otherwise you hit "partial updates" issue.

If you do not want to use testing repos then install gitlab from stable repos.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

Board footer

Powered by FluxBB