Gitlab ruby​​ 版本

Gitlab ruby​​ 版本

我安装了 bitnami gitlab,然后尝试更新一些软件包以安装 compass 和 sass。我认为我现在已经破坏了 gitlab。似乎我的 ruby​​ 版本不对。

大部分看起来还不错,但是当我尝试推动改变时,我得到了......

POST git-receive-pack (903 bytes)

remote: /opt/bitnami/ruby/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)[K
remote:     from /opt/bitnami/ruby/lib/ruby/site_ruby/1.9.1/rubygems.rb:31:in `require'[K
remote:     from /opt/bitnami/ruby/lib/ruby/site_ruby/1.9.1/rubygems.rb:31[K
remote:     from /opt/bitnami/ruby/lib/ruby/site_ruby/1.9.1/ubygems.rb:10:in `require'[K

remote:     from /opt/bitnami/ruby/lib/ruby/site_ruby/1.9.1/ubygems.rb:10[K
remote: error: hook declined to update refs/heads/master[K

我该怎么做才能让我的 bitnami gitlab 再次接受推送?

答案1

这对我来说是世界...

从这里:http://leonard.io/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/

sudo apt-get update

sudo apt-get install ruby1.9.1 ruby1.9.1-dev \
  rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \
  build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev

sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
         --slave   /usr/share/man/man1/ruby.1.gz ruby.1.gz \
                        /usr/share/man/man1/ruby1.9.1.1.gz \
        --slave   /usr/bin/ri ri /usr/bin/ri1.9.1 \
        --slave   /usr/bin/irb irb /usr/bin/irb1.9.1 \
        --slave   /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1

# choose your interpreter
# changes symlinks for /usr/bin/ruby , /usr/bin/gem
# /usr/bin/irb, /usr/bin/ri and man (1) ruby
sudo update-alternatives --config ruby
sudo update-alternatives --config gem

# now try
ruby --version

相关内容