Gitlab Setup无法为application / opt / gitlab / embedded / service / gitlab-rails

时间:2017-08-31 10:58:18

标签: ruby-on-rails ruby nginx centos7 gitlab-omnibus

我正在尝试在centos 7服务器上设置Gitlab,并尝试使用现有的nginx来配置许多域。但它有关于gitlab-rails的错误,但我不知道它是什么。

我的/var/log/nginx/error.log显示错误:

  

App 13682 stdout:   App 13682 stdout:   [E 2017-08-31 10:41:44.4250 9768 / T15 age / Cor / App / Implementation.cpp:304]:无法为application / opt / gitlab / embedded / service / gitlab-rails生成进程:错误o $     错误ID:24c0d6b5     错误详细信息保存到:/tmp/passenger-error-PkX0HB.html     来自应用程序的消息:无法加载此类文件 - bundler / setup(LoadError)     /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in require' /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in要求&#39;     /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in activate_gem' /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in阻止在run_load_path_setup_code&#39;     /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in running_bundler' /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in run_load_path_setup_code&#39;     /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in preload_app' /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in&#39;     /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in <module:PhusionPassenger>' /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in&#39;   [E 2017-08-31 10:41:44.4319 9768 / T3 age / Cor / Con / CheckoutSession.cpp:285]:[客户端1-11]无法结账会话,因为发生了产生错误。标识符

我的gitlab configure /etc/gitlab/gitlab.rb:

external_url 'http://gitlab.ifbuyer.com'
nginx['enable'] = false
unicorn['enable'] = false
web_server['external_users'] = ['nginx']
gitlab_rails['internal_api_url'] = 'http://gitlab.ifbuyer.com'
nginx['redirect_http_to_https'] = true

我的gitlab.ifbuyer.com.conf之后是链接https://docs.gitlab.com/omnibus/settings/nginx.html#using-an-existing-passenger-nginx-installation

我正在使用gitlab-ce-9.5.0-ce.0.el7.x86_64

任何帮助将不胜感激。非常感谢你

1 个答案:

答案 0 :(得分:0)

您应该尝试使用docker运行Gitlab,这将有助于您专注于nginx部分

您可以使用以下脚本

安装docker和docker-compose
curl -SsL https://get.docker.com | sh
pip install docker-compose

然后为gitlab创建一个文件夹并创建一个docker-compose.yml文件

<强>搬运工-compose.yml

version: '3'
services:
  gitlab:
    image: gitlab/gitlab-ce:${GITLAB_VERSION}
    hostname: gitlab.example.com
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.example.com'
        gitlab_rails['gitlab_shell_ssh_port'] = 22
    ports:
      - "22:22"
      - "80:80"
      - "443:443"
    volumes:
      - ./config:/etc/gitlab
      - ./logs:/var/log/gitlab
      - ./data:/var/opt/gitlab
      - ./scrtips:/scripts

最新的GITLAB_VERSION为9.5.2-ce.0。所以你可以在文件中替换它,或者在使用下面的命令

运行上面之前导出它
$ GITLAB_VERSION='9.5.2-ce.0' docker-compose up

服务器启动后,可以在gitlab.example.com访问,进行主机输入或在配置中使用IP。然后你可以从你的nginx中代理它。