2013-07-31 62 views
0

所以我完全是Rails的新手。这可能是更多的Linux问题......因为这个问题似乎围绕着libicu-devel和charlock_holmes gem。rake gitlab:在RHEL 5上安装失败,编译版本为libicu

我一直在关注这些指南(当然还有Google搜索)。我已经从RVM获得了Ruby 2上的Rails 4。这是Rackspace的RHEL5安装(专用)。 https://github.com/gitlabhq/gitlabhq/blob/5-4-stable/doc/install/installation.md http://blog.lsong.org/2013/07/install-gitlab-on-centos-6/

有沿途的几个问题后,我想我正在取得进展,直到我从百胜和事实似乎并没有成为libicu的包装过去的3.6随时随地抓住包。我从源代码编译,一切似乎安装好。 charlock_holmes宝石已添加。

但是在为GitLab添加数据库资料之后,我去初始化了一些东西,不能继续前进,现在我不知道该怎么做。在这一点上我发现了其他错误的引用,但他们通常来自数据库没有正确设置,所以他们没有帮助。

任何拥有比我更多的Rails体验的人都知道我接下来可以做什么?

rvmsudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production 
rake aborted! 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so: undefined symbol: _ZN7icu_4_28ByteSink15GetAppendBufferEiiPciPi - /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes.rb:1:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab-grit-2.5.1/lib/grit.rb:79:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab_git-1.3.0/lib/gitlab_git.rb:4:in `<top (required)>' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' 
/home/git/gitlab/config/application.rb:9:in `<top (required)>' 
/home/git/gitlab/Rakefile:5:in `require' 
/home/git/gitlab/Rakefile:5:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' 
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' 
(See full trace by running task with --trace) 

让我知道是否需要添加更多信息。我尝试添加--trace标志并获得相同的输出。我是对libicu/charlock_holmes的猜测是,因为这是rake aborted!之后的第一条消息。

我的公司不会为Github企业之类的任何项目提供支持,我希望能够通过一些工具与我们众多的部门共享代码来构建子域。按照我要去的速度,我不妨从头开始写一个新的应用程序。提前致谢!

更新::check--trace,发现虽然大部分是相同的,有一些额外的行末。

更新2:试了两个建议。切换到1.9.3并运行bundle config命令(无输出)。再次追溯,结果如下。

rvmsudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production --trace 
rake aborted! 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so: undefined symbol: _ZN7icu_4_28ByteSink15GetAppendBufferEiiPciPi - /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support /dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes.rb:1:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-grit-2.5.1/lib/grit.rb:79:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab_git-1.3.0/lib/gitlab_git.rb:4:in `<top (required)>' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' 
/home/jharvey/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' 
/home/git/gitlab/config/application.rb:9:in `<top (required)>' 
/home/git/gitlab/Rakefile:5:in `require' 
/home/git/gitlab/Rakefile:5:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load' 
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>' 

更新3:取得进展。我似乎已经成功地安装了所有的东西之后,用redis搞了一下。我可以成功检查“env:info”。但是现在我尝试使用init.d在线获取gitlab,但它不工作。 = /安装后没有初始化脚本,所以我从gitlabhq中获取了一篇文章,GitLab installation on linux(使用5-4就像我的安装)。该脚本的结果如下:

/etc/init.d/gitlab start 
bash: bundle: command not found` 

我们会看看我能否整理出来。我欢迎任何帮助。

更新4:排序。 RVM无法被git用户看到。没有测试系统的每个方面,但我现在有一个Git子域上运行的GitLab。对原始问题没有特定的答案。但我似乎已经走到了旅程的尽头。 十字手指

+0

是的,这与轨道无关;我删除了'ruby-on-rails'标签。 – deefour

+0

你是否像README说的那样运行'bundle config build.charlock_holmes --with-icu-dir =/path/to/installed/icu4c'命令?你有没有安装icu4c? – deefour

+0

Ruby 2.0?您需要ruby1.9.3-p392 – VonC

回答

0

对我来说,这是一个LDD问题。在我的系统上,安装了libicui18n的头文件,同时安装了libicui18n.so.36和libicui18n.so.42。

验证这与

ldd vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/charlock_holmes-{YOUR VERSION HERE}/charlock_holmes/charlock_holmes.so 

查找线路

libicui18n.so.## => ... 

如果##是36,然后捆绑的防错版链接(应该是42)。 Bundler似乎无视--with-icu-dir标志。不知道为什么。

我的修复是使用宝石来编译charlock_holmes

gem install charlock_holmes -v '0.6.9.4' -- --with-icu-dir=[...] 

其中[...]是路径lib目录中,ICU 42安装。然后我将生成的二进制文件(charlock_holmes.so)复制到bundler生成的二进制文件中。