2

I'm trying to install gitlab on my gentoo server using this unofficial guide: https://github.com/cvut/gentoo-overlay/wiki/Installation-guide-for-GitLab-6.x

I faced with 2 problems:

  1. If I switch to recommended in tutorial ruby20 (using eselect) then I can't install the package at all (I created issue, see it here: https://github.com/cvut/gentoo-overlay/issues/6). Looks like dev-ruby/bundler doesn't have ruby_targets_ruby20 flag
  2. If I switch to ruby19 everything went fine until I run

    emerge --config "=www-apps/gitlabhq-6.0.2-r1"

When I run this command ebuild script for some reason tries to use ruby 20 instead of ruby19 (I created issue, see it here: https://github.com/cvut/gentoo-overlay/issues/5)

ivan-capk-me
  • 317
  • 3
  • 8

2 Answers2

1

I have found a workaround for this issue. I temporarily moved /usr/bin/ruby19 to /usr/bin/ruby20. Configuration went fine. Then I rolled back /usr/bin/ruby20 to original version.

# cp /usr/bin/ruby20 /usr/bin/ruby20.bak
# cp /usr/bin/ruby19 /usr/bin/ruby20
# emerge --config "=www-apps/gitlabhq-6.0.2-r1"
# rm /usr/bin/ruby20
# cp /usr/bin/ruby20.bak /usr/bin/ruby20
ivan-capk-me
  • 317
  • 3
  • 8
1

My general experience with Ruby on Gentoo (my favorite distribution so far) has been one of primarily frustration. Almost every time a system update (via emerge -auDN --with-bdeps=y @world) fails due to conflicts, it's usually because of conflicting Ruby packages and dependencies. Furthermore, the operating environment of GitLab itself is fairly complex.

I run a couple of GitLab servers, and I do so using GitLab's supplied Docker image, which is remarkably painless.

Upgrading is as simple as re-pulling the latest tag of the gitlab image. This is the docker command I run:

docker pull gitlab/gitlab-ce:latest
docker run --detach \
           --hostname localhost \
           --publish 0.0.0.0:7080:80 --publish 0.0.0.0:7022:22 \
           --name gitlab \
           --restart always \
           --volume /srv/gitlab/config:/etc/gitlab \
           --volume /srv/gitlab/logs:/var/log/gitlab \
           --volume /srv/gitlab/data:/var/opt/gitlab \
           gitlab/gitlab-ce:latest

The task reduces, then, to installing Docker on Gentoo, which is much easier than Ruby.

In the year that I've been running a production GitLab server using docker, I've had two problems, both of which I've resolved with the single command docker restart gitlab. This is the kind of thing docker was made for. I'd recommend taking advantage of it.