我想在我的覆盆子pi(raspbian wheezy)上安装gitlab
我遵循本指南:https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
但是在第6步'安装数据库'我收到这个错误:
pi@raspberry /home/git/gitlab $ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
rake aborted!
cannot load such file -- sanitize
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gollum-lib-3.0.0/lib/gollum-lib.rb:11:in `<top (required)>'
/home/git/gitlab/config/application.rb:6:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
我试图明确安装gem&#39; sanitize&#39;但它没有用。
有什么想法吗?
答案 0 :(得分:3)
这不是一个合适的解决方案,但我通过手动下载清理和编辑gollum-lib并清理文件来获得gitlab工作。
$ cd /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems
$ sudo -u git git clone https://github.com/rgrove/sanitize.git
$ sudo -u git mv sanitize sanitize-2.1.0
然后编辑gollum-lib.rb中的require语句......
$ sudo -u git vim gollum-lib-3.0.0/lib/gollum-lib.rb
require 'rubygems' # not sure if this is really necessary
#require 'sanitize'
require '/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sanitize-2.1.0/lib/sanitize.rb'
...和sanitize.rb。
$ sudo -u git vim sanitize-2.1.0/lib/sanitize.rb
#require 'sanitize/version'
#require 'sanitize/config'
#require 'sanitize/config/restricted'
#require 'sanitize/config/basic'
#require 'sanitize/config/relaxed'
#require 'sanitize/transformers/clean_cdata'
#require 'sanitize/transformers/clean_comment'
#require 'sanitize/transformers/clean_element'
require File.expand_path('../sanitize/version',__FILE__)
require File.expand_path('../sanitize/config',__FILE__)
require File.expand_path('../sanitize/config/restricted',__FILE__)
require File.expand_path('../sanitize/config/basic',__FILE__)
require File.expand_path('../sanitize/config/relaxed',__FILE__)
require File.expand_path('../sanitize/transformers/clean_cdata',__FILE__)
require File.expand_path('../sanitize/transformers/clean_comment',__FILE__)
require File.expand_path('../sanitize/transformers/clean_element',__FILE__)