1

I have configured GitLab CE to use relative URL following this documentation and after configuration while running reconfigure it gives me an error.

Step1

# cat /opt/gitlab/embedded/service/gitlab-rails/config/initializers/relative_url.rb

Rails.application.configure do
 config.relative_url_root = "/gitlab"
end

Step2

# cat /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml | grep relative_url
    relative_url_root: /gitlab

Step3

# cat /opt/gitlab/embedded/service/gitlab-shell/config.yml | grep gitlab_url
gitlab_url: "http://localhost:8080/gitlab"

Step4

# cat /opt/gitlab/embedded/service/gitlab-rails/config/unicorn.rb | grep  RAILS
ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"

Step5

# cat /etc/gitlab/gitlab.rb | grep "auth_backend"
gitlab_workhorse['auth_backend'] = "http://localhost:8080/gitlab"

Step6 [Stage where error occurs]

# gitlab-ctl reconfigure
..
..
Running handlers:
There was an error running gitlab-ctl reconfigure:

link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/relative_url.rb] (gitlab::gitlab-rails line 342) had an error: TypeError: no implicit conversion of nil into String

Running handlers complete
Chef Client failed. 2 resources updated in 19 seconds

1 Answer 1

0

It would appear you've run into this bug, titled: no implicit conversion of nil into String.

This file /etc/gitlab/gitlab.rb needs to have this configuration, git_data_dirs, changed from this format:

git_data_dirs({
    "default": {
        "path": "/srv/gitlab/git-data"
    }
})

To this:

git_data_dirs({
    "default" => {
        "path" => "/srv/gitlab/git-data"
    }
})

Then re-run reconfigure:

$ gitlab-ctl reconfigure

References

1
  • @slim, thank you for helping me out. But Iooking into the configuration file, I see it is not enabled at all. This is how it looks like currently dpaste.de/t6Vk Commented Jul 15, 2018 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .