更新 GitLab 后,输出错误 CSS

After update GitLab, outputs error CSS

更新后(omnibus-gitlab),当'Dashboard | Gitlab'加载时,输出错误:

"Error compiling CSS asset Sprockets::FileNotFound: couldn't find file 'jquery.ui.datepicker' (in /home/git/gitlab/app/assets/stylesheets/application.scss:5) /usr/local/lib/ruby/gems/2.1.0/gems/sprickets-2.12.3/lib/sprockets/context.rb:106:in `resolve'

更新 7.4.2 之前的 GitLab。

$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...

Git configured for git user? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 2.0.1 ? ... OK (2.0.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
        /home/git/repositories: OK
        /home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.4.14
Send ping to redis server: PONG
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
... yes
Redis version >= 2.0.0? ... yes
Ruby version >= 2.0.0 ? ... yes (2.1.2)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)

Checking GitLab ... Finished

我的环境:

$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

System information
System:         Debian 7.8
Current User:   git
Using RVM:      no
Ruby Version:   2.1.2p95
Gem Version:    2.2.2
Bundler Version:1.7.4
Rake Version:   10.4.2
Sidekiq Version:2.17.0

GitLab information
Version:        7.4.2
Revision:       477743a
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            https://GitHub.lcl.loc/gitlab
HTTP Clone URL: https://GitHub.lcl.loc/gitlab/some-project.git
SSH Clone URL:  git@GitHub.lcl.loc:some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        2.0.1
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

app/assets/stylesheets/application.scss#L5 应该包括 jquery.ui.datepicker.

不是 jquety.ui.datepicker,(确实)不存在。

我在这个 link 中找到了解决方案。需要在文件 /home/git/gitlab/app/assets/stylesheets/application.scss.

中将 jquery.ui.datepicker 重命名为 jquery-ui/datepicker 并将 jquery.ui.autocomplete 重命名为 jquery-ui/autocomplete

在我的例子中,我有带有外部 Nginx 的 GitLab。重启nginx一切恢复正常

service nginx restart