安装 gitlab-5.0 时遇到问题.我无法完成安装 [英] Trouble installing gitlab-5.0. I can't finish the installation

查看:12
本文介绍了安装 gitlab-5.0 时遇到问题.我无法完成安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Ubuntu 10 上安装 gitlab-5.0,当我在 gitlab 安装指南的 Ruby 部分,它向我展示了下一个冲突:

I am installing gitlab-5.0 on Ubuntu 10, when I execute the 'sudo gem install bundler' command on section Ruby of the gitlab installation guide, It shows me the next conflict:

root@ubuntu:/home/gitlab/gitlab# sudo gem install bundler
Successfully installed bundler-1.3.4
Installing ri documentation for bundler-1.3.4
/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
Done installing documentation for bundler after 8 seconds
1 gem installed
root@ubuntu:/home/gitlab/gitlab# 

然后,在 部分宝石...

root@ubuntu:/home/gitlab/gitlab# sudo gem install charlock_holmes --version '0.6.9'
Building native extensions.  This could take a while...
Successfully installed charlock_holmes-0.6.9
Installing ri documentation for charlock_holmes-0.6.9
/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
Done installing documentation for charlock_holmes after 0 seconds
1 gem installed

root@ubuntu:/home/gitlab/gitlab# sudo -u git -H bundle install --deployment --without development test postgres
Gemfile syntax error:
/home/gitlab/gitlab/Gemfile:14: syntax error, unexpected ':', expecting $end
gem "mysql2", group: :mysql

我的红宝石版本:

root@ubuntu:/home/gitlab/gitlab# ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]

你会如何避免这个错误?

How would you avoid this error?

推荐答案

堆栈跟踪表明您确实不是使用 Ruby 2.0 来安装 gems,而是系统提供的 1.8.7.这可能是您使用 sudo 造成的.

The stack traces indicate that you are indeed not using Ruby 2.0 for installing your gems, but the system-provided 1.8.7. This is probably caused by your use of sudo.

如果您使用 RVM 安装了 Ruby 2.0.0,则必须改用 rvmsudo,这将确保 rvm 对要加载的 $PATH 所做的更改以 root 身份运行的程序可以使用特定的 ruby​​ 版本.默认情况下,sudo会清理 $PATH 并取消更改.

If you have installed your Ruby 2.0.0 using RVM, you have to use rvmsudo instead which will make sure that the changes rvm does to the $PATH to load a specific ruby version will be available to the program run as root. By default, sudocleans up the $PATH and will revent the changes.

这篇关于安装 gitlab-5.0 时遇到问题.我无法完成安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆