安装Gitlab 6.7时发现Rake版本不正确

时间:2014-04-13 04:12:29

标签: ruby rake bundler gitlab

我正在尝试在Amazon Linux 2014.03上安装Gitlab 6.7,这与CentOS / RHEL类似。我已按照CentOS说明操作,并在"Initialize Database and Activate Advanced Features"部分中收到此错误:

$ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
Could not find rake-10.1.1 in any of the sources
Run `bundle install` to install missing gems.

看起来rake的版本不同,但我遵循所有说明从源代码构建Ruby。

$ sudo -u git -H rake --version
rake, version 0.9.6

我不熟悉ruby或bundle,所以我跑了"捆绑安装"正如错误消息所示,但之后,我看到同样的问题。

$ sudo -u git -H bundle install | grep rake
Using rake 10.1.1
$ sudo -u git -H bundle install | tail -3
Your bundle is complete!
Gems in the groups development, test, postgres and aws were not installed.
It was installed into ./vendor/bundle

1 个答案:

答案 0 :(得分:1)

问题是Amazon Linux有一个名为ruby20的独立软件包:

$ sudo yum list installed | grep ruby
ruby20.x86_64                        2.0.0.451-1.14.amzn1          installed    
ruby20-irb.noarch                    2.0.0.451-1.14.amzn1          installed    
ruby20-libs.x86_64                   2.0.0.451-1.14.amzn1          installed    
rubygem20-bigdecimal.x86_64          1.2.0-1.14.amzn1              installed    
rubygem20-json.x86_64                1.7.7-101.27.amzn1            @amzn-updates
rubygem20-psych.x86_64               2.0.0-1.14.amzn1              installed    
rubygem20-rdoc.noarch                4.0.1-2.18.amzn1              @amzn-main   
rubygems20.noarch                    2.0.14-1.14.amzn1             installed    

跑完下面的一切然后一切正常:

$ sudo yum remove ruby20 ruby20-libs