Skip to content

Fix gitaly-ruby not starting on case-sensitive filesystems

Stan Hu requested to merge sh-fix-gitaly-ruby-startup into master

When gitaly-ruby is used on a case-sensitive filesystem, the require_relative calls depend on substitutions based on the working directory of ruby/lib/gitlab/git.rb. For example, suppose /Code/gitaly/ruby were used:

  1. __dir__ returns /code/gitaly/ruby (if cd /code is run to set the working directory)
  2. Dir.glob returns files prefixed by /Code/gitaly/ruby/

The require_relative call in git.rb attempts to strip the directory name from the files returned in step 2, but due to the mismatch the substitution failed. This prevented gitaly-ruby from starting.

To fix this, we use the canonical name of the directory by calling Dir.glob on that path. Under the hood, Dir.glob makes a system call to readdir() to extract this name.

Closes #2538 (closed)

Edited by GitLab Release Tools Bot

Merge request reports

Loading