Gitlab-Libicu-Issue.md

Ubuntu server 12.04提示升级libicu48到libicu52:

# code block [1]
root@krias:/home/karminski# aptitude upgrade
Resolving dependencies...
The following NEW packages will be installed:
  icu-devtools{a} libicu52{a}
The following packages will be REMOVED:
  libicu48{u}

但是升级完毕后导致gitlab无法启动.

# code block [2]
root@krias:/home/apps# /etc/init.d/gitlab restart
Shutting down both Unicorn and Sidekiq.
GitLab is not running.
Starting both the GitLab Unicorn and Sidekiq.
The GitLab Unicorn web server with pid 25527 is running.
The GitLab Sidekiq job dispatcher with pid 25534 is running.
GitLab and all its components are up and running.
root@krias:/home/apps# master failed to start, check stderr log for details

运行check发现以下问题:

# code block [3]
root@krias:/home/apps# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Could not locate Gemfile
root@krias:/home/apps# cd /home/git/gitlab
root@krias:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
rake aborted!
libicui18n.so.48: cannot open shared object file: No such file or directory - /home/git/gitlab/vendor/bundle/ruby/2.0.0/gem
s/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so
/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/charlock_holmes-0.6.9.4/lib/charlock_holmes.rb:1:in `'
/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/gitlab-grit-2.6.4/lib/grit.rb:79:in `'
/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/gitlab_git-5.4.0/lib/gitlab_git.rb:4:in `'
/home/git/gitlab/config/application.rb:6:in `'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `'
(See full trace by running task with --trace)
    

处理方式是:重新安装下charlock_holmes就好了.

root@krias:/home/git/gitlab# gem uninstall  acts-as-taggable-on
root@krias:/home/git/gitlab# bundle install
...
    

详细的重新安装参考见: http://stackoverflow.com/questions/12188833/how-to-reinstall-a-gem-using-bundler
以上.