You are not logged in.
Pages: 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
Last edited by tqre (2021-04-06 13:29:26)
Offline
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
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
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).
Offline
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
Pages: 1