Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2c97f2ff
Commit
2c97f2ff
authored
Oct 02, 2020
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document gotcha reading from assets dir
parent
a3c04e34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
doc/development/gotchas.md
doc/development/gotchas.md
+15
-0
No files found.
doc/development/gotchas.md
View file @
2c97f2ff
...
...
@@ -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
Since GitLab 10.8, 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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment