Gitlab报错 ActionView Template Error uninitialized constant ActionView CompiledTemplates EXPR_ARG

参考:https://gitlab.com/gitlab-org/gitlab-ce/issues/42045#note_73010232

解决方法:升级 gems

  • haml to (5.0.4)
  • hamlit to (2.8.8)
  • temple to (>= 0.8.0)

详细错误日志

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Started GET "/users/password/edit?reset_password_token=[FILTERED]" for 115.238.84.211 at 2018-06-11 20:19:46 +0800
Processing by PasswordsController#edit as HTML
Parameters: {"reset_password_token"=>"[FILTERED]"}
Completed 500 Internal Server Error in 390ms (ActiveRecord: 375.4ms)

ActionView::Template::Error (uninitialized constant ActionView::CompiledTemplates::EXPR_ARG):
1: !!! 5
2: %html.devise-layout-html{ class: system_message_class }
3: = render "layouts/head"
4: %body.ui_indigo.login-page.application.navless{ data: { page: body_data_page } }
5: .page-wrap
app/views/layouts/devise.html.haml:2:in `_app_views_layouts_devise_html_haml__520135394538974061_46936018683300'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:355:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'

修改Gemfile

Gemfile

1
# vim Gemfile
1
2
3
4
5
6
# HAML
# gem 'hamlit', '~> 2.6.1'
gem 'hamlit', '~> 2.8.8'

# gem 'haml_lint', '~> 0.26.0', require: false
gem 'haml_lint', '~> 0.26.0', require: false

Gemfile.lock

1
# vim Gemfile.lock
1
2
3
4
5
6
7
8
9
10
11
12
haml (4.0.7)
tilt
haml_lint (0.26.0)
haml (>= 4.0, < 5.1)
rainbow
rake (>= 10, < 13)
rubocop (>= 0.49.0)
sysexits (~> 1.1)
hamlit (2.6.1)
temple (~> 0.7.6)
thor
tilt

改为:

1
2
3
4
5
6
7
8
9
10
11
12
haml (5.0.4)
tilt
haml_lint (0.28.0)
haml (>= 4.0, < 5.1)
rainbow
rake (>= 10, < 13)
rubocop (>= 0.49.0)
sysexits (~> 1.1)
hamlit (2.8.8)
temple (~> 0.8.0)
thor
tilt
1
2
haml_lint (~> 0.26.0)
hamlit (~> 2.6.1)

改为:

1
2
haml_lint (~> 0.28.0)
hamlit (~> 2.8.8)

升级Gems

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# sudo -u git -H vim .bundle/config

BUNDLE_FROZEN: "false"

# sudo -u git -H bundle lock --update=hamlit
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies........
Writing lockfile to /data/git/gitlab/Gemfile.lock
# sudo -u git -H bundle lock --update=haml
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.........
Writing lockfile to /data/git/gitlab/Gemfile.lock
# sudo -u git -H bundle lock --update=haml_lint
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies........
Writing lockfile to /data/git/gitlab/Gemfile.lock
# sudo -u git -H bundle install --deployment --without development test postgres aws kerberos
# sudo -u git service gitlab restart

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :