2

我正在尝试在之后将我的 GitLab 移动到 mysql 。在我尝试的过程中 -

    $ cd /opt/gitlab/embedded/service/gitlab-rails
    $ sudo /opt/gitlab/embedded/bin/bundle install

我收到以下错误 -

使用本机扩展安装 gpgme 2.0.13

使用本机扩展安装 nokogiri 1.8.2

Gem::Ext::BuildError: 错误: 无法构建 gem 原生扩展。

当前目录:/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/allocations-1.0.5/ext/liballocations /opt/gitlab/embedded/bin/ruby -r ./siteconf20180615-5748-1r5uwd8 .rb extconf.rb

mkmf.rb 在 /opt/gitlab/embedded/lib/ruby/include/ruby.h 中找不到 ruby​​ 的头文件

extconf 失败,退出代码 1

Gem 文件将继续安装在 /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/allocations-1.0.5 以供检查。结果记录到 /opt/gitlab/embedded/service/gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/allocations-1.0.5/gem_make.out

安装分配 (1.0.5) 时出错,Bundler 无法继续。gem install allocations -v '1.0.5' 在捆绑之前确保成功。

我试过sudo gem install allocations -v '1.0.5'说成功构建了一个 gem,但一遍又一遍地给出相同的错误。我也安装了 ruby​​2.5-dev。

编辑:

如评论中所述,这是 /opt/gitlab/embedded/service/gitlab-rails/.bundle/config 中的配置 -


BUNDLE_RETRY:“5”

BUNDLE_PATH:“/opt/gitlab/embedded/service/gem”

BUNDLE_JOBS:“9”

BUNDLE_DISABLE_SHARED_GEMS:“真”

BUNDLE_WITHOUT:“开发:测试:postgres”

如果我跑sudo gitlab-ctl reconfigure,我会得到这个巨大的错误 -

There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash"  "/tmp/chef-script20180618-9085-8vou2p" ----
STDOUT: bundler: failed to load command: rake (/opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/rake)
Bundler::GemNotFound: Your bundle is locked to RedCloth (4.3.2), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of RedCloth (4.3.2) has removed it. You'll need to update your bundle to a different version of RedCloth (4.3.2) that hasn't been removed in order to install.
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
  /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
  /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
STDERR: 
4

0 回答 0