Florent Peterschmitt

GitLab - Version de Ruby alternative sans RVM

Testé pour la version 7.1 avec la distribution Debian Wheezy.

Installation par les sources avec MySQL.

Sous Debian

apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl

Compilation de Ruby

export GRV="2.1.2"
wget "http://cache.ruby-lang.org/pub/ruby/$(echo -n "${GRV}" | sed -rn 's/(.*)\.[0-9]*$/\1/p')/ruby-${GRV}.tar.gz"
tar xf ruby-${GRV}.tar.gz
cd ruby-${GRV}
./configure --prefix=/opt/ruby-${GRV} --disable-install-rdoc
make -j3
make install
ln -sf /opt/ruby-${GRV} /opt/ruby

Environnement

echo 'export PATH="/opt/ruby/bin:$PATH"' > /etc/default/gitlab    
sed -e '1s@.*@#!/opt/ruby/bin/ruby@g' -i /home/git/gitlab-shell/hooks/update

Installation des gems pour GitLab

/opt/ruby/bin/gem install bundle
su - git
cd /home/git/gitlab
ruby -v # vérifier qu’on a bien la bonne version…
bundle install --without development test postgres --deployment # adapter la commande selon qu’on utilise postgres…

GO

service gitlab restart

Comments