我正在安装gitlab并遵循Gitlab安装指南的所有说明。一切正常,但在步骤“初始化数据库并激活高级功能” 它失败了!
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
我收到此错误消息。
rake aborted!
uninitialized constant Rack::Attack
/home/git/gitlab/config/application.rb:82:in `<class:Application>'
/home/git/gitlab/config/application.rb:13:in `<module:Gitlab>'
/home/git/gitlab/config/application.rb:12:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
在application.rb文件中,我按照说明中的说法取消注释了该行。
# Enable rack attack middleware
# Find and uncomment the line 'config.middleware.use Rack::Attack'
答案 0 :(得分:4)
请注意,来自issue 5245:
机架攻击是新的6-2稳定版,将于10月22日发布。
话虽如此,请阅读“doc/security/rack_attack.md
”:
取消注释config/application.rb
中的行config.middleware.use Rack::Attack
。
其他步骤是:
- 将
config/initializers/rack_attack.rb.example
重命名为config/initializers/rack_attack.rb
- 查看
paths_to_be_protected
并添加您需要保护的任何其他路径- 重新启动GitLab实例