diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /doc/development/gotchas.md | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'doc/development/gotchas.md')
-rw-r--r-- | doc/development/gotchas.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md index f7b44e74c17..cc3db267d53 100644 --- a/doc/development/gotchas.md +++ b/doc/development/gotchas.md @@ -3,6 +3,21 @@ The purpose of this guide is to document potential "gotchas" that contributors might encounter or should avoid during development of GitLab CE and EE. +## Do not read files from app/assets directory + +In GitLab 10.8 and later, Omnibus has [dropped the `app/assets` directory](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/2456), +after asset compilation. The `ee/app/assets`, `vendor/assets` directories are dropped as well. + +This means that reading files from that directory will fail in Omnibus-installed GitLab instances: + +```ruby +file = Rails.root.join('app/assets/images/logo.svg') + +# This file does not exist, read will fail with: +# Errno::ENOENT: No such file or directory @ rb_sysopen +File.read(file) +``` + ## Do not assert against the absolute value of a sequence-generated attribute Consider the following factory: |