更新 GitLab 后,输出错误 CSS
Posted
技术标签:
【中文标题】更新 GitLab 后,输出错误 CSS【英文标题】:After update GitLab, outputs error CSS 【发布时间】:2015-04-13 10:56:30 【问题描述】:更新后(omnibus-gitlab),当 'Dashboard | Gitlab'加载,输出错误:
“编译 CSS 资产 Sprockets::FileNotFound 时出错:找不到文件 'jquery.ui.datepicker'(在 /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 `解决'
GitLab 更新 7.4.2 之前。
$ 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
【问题讨论】:
【参考方案1】:app/assets/stylesheets/application.scss#L5
应包含jquery.ui.datepicker
。
不是jquety.ui.datepicker
,它(确实)不存在。
【讨论】:
jquety.ui.datepicker 真的不是。接下来呢?我不明白该怎么做(如何在 Debian 控制台中下载这个?! @Nikolay 我的问题是:application.scss#L5
中有 jquety
吗?或jquery
? jquery
存在。 jquety
看起来像一个类型。
"*= require jquery.ui.datepicker" - 文件 app/assets/stylesheets/application.scss#L5 中的这 5 行
@Nikolay 那么您能否对错误消息进行精确复制和粘贴,因为您的问题包括jquety
,而不是jquery
。
很抱歉,我无法复制文本。或者不知道这是怎么做的。文本不发出。【参考方案2】:
我在link 中找到了解决方案。需要在文件/home/git/gitlab/app/assets/stylesheets/application.scss
中将jquery.ui.datepicker
重命名为jquery-ui/datepicker
并将jquery.ui.autocomplete
重命名为jquery-ui/autocomplete
。
【讨论】:
【参考方案3】:就我而言,我有带有外部 nginx 的 GitLab。重启nginx一切恢复正常。
service nginx restart
【讨论】:
以上是关于更新 GitLab 后,输出错误 CSS的主要内容,如果未能解决你的问题,请参考以下文章
将 Gitlab 从 9.3.7 更新到 9.3.8 安装 re2 时出错
安装后 Sass 和 Compass 出现奇怪的 CSS 错误