Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: already initialized constant REXML:: warnings with guard-brakeman #41

Open
ndbroadbent opened this issue Nov 24, 2022 · 1 comment

Comments

@ndbroadbent
Copy link

See: presidentbeef/brakeman#1705

I noticed that adding the guard-brakeman gem to my Gemfile (in the development group) causes lots of these warnings to appear in my logs:

/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/brakeman-5.4.0/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:30: warning: already initialized constant REXML::Parsers::BaseParser::LETTER
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:30: warning: previous definition of LETTER was here
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/brakeman-5.4.0/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:31: warning: already initialized constant REXML::Parsers::BaseParser::DIGIT
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:31: warning: previous definition of DIGIT was here
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/brakeman-5.4.0/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:33: warning: already initialized constant REXML::Parsers::BaseParser::COMBININGCHAR
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:33: warning: previous definition of COMBININGCHAR was here
/Users/ndbroadbent/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/brakeman-5.4.0/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb:34: warning: already initialized constant REXML::Parsers::BaseParser::EXTENDER
...
@ryankon
Copy link

ryankon commented Jan 20, 2024

@ndbroadbent I ran into this issue as well. It was caused by not setting required: false for rubocop and rubocop-rails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants