Question

I want to install gitlab on my raspberry pi (raspbian wheezy)

I follow this guide: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md

But in step 6 'Install Database' I get this error:

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)

I tried to explicitly install the gem 'sanitize' but it doesn't work.

Any ideas?

Was it helpful?

Solution

It is not a proper solution but I got gitlab working by manually downloading sanitize and editing gollum-lib and sanitize files.

$ 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

Then edit the require statements in gollum-lib.rb...

$ 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'

... and 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__)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top