I was installing gitlab and followed all the instructions of the installation guide of Gitlab. Everything works fine but then at Step "Initialize Database and Activate Advanced Features" it failed!
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
I got this error Message.
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)
In the application.rb file I uncommented the line as it says in the instruction.
# Enable rack attack middleware
# Find and uncomment the line 'config.middleware.use Rack::Attack'
Note that, from issue 5245:
Rack Attack is new for 6-2 stable which will be released on 22rd of october.
That being said, read "doc/security/rack_attack.md":
uncomment the line config.middleware.use Rack::Attack in the config/application.rb find isn't enough.
The other steps are:
- Rename
config/initializers/rack_attack.rb.exampletoconfig/initializers/rack_attack.rb- Review the
paths_to_be_protectedand add any other path you need protecting- Restart GitLab instance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With