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

Getting lots of warnings when attempting to use? #69

Closed
tomchapin opened this issue Jul 10, 2017 · 3 comments
Closed

Getting lots of warnings when attempting to use? #69

tomchapin opened this issue Jul 10, 2017 · 3 comments
Labels

Comments

@tomchapin
Copy link

When I install colorls on my mac (with Ruby 2.4.1p111) and use it, it is working, but I get a bunch of warnings?

/usr/local/Cellar/rbenv/1.1.0/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/filetest/separator_pattern.rb:4: warning: already initialized constant FileTest::SEPARATOR_PATTERN
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/filetest/separator_pattern.rb:4: warning: previous definition of SEPARATOR_PATTERN was here
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/kernel/ergo.rb:29: warning: already initialized constant NilClass::FUNCTOR
/usr/local/Cellar/rbenv/1.1.0/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/kernel/ergo.rb:29: warning: previous definition of FUNCTOR was here
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/string/bracket.rb:3: warning: already initialized constant String::BRA2KET
/usr/local/Cellar/rbenv/1.1.0/versions/2.4.1/lib/ruby/gems/2.4.0/gems/facets-3.1.0/lib/core/facets/string/bracket.rb:3: warning: previous definition of BRA2KET was here
@athityakumar
Copy link
Owner

@tomchapin - Thanks for filing this issue 😄 . Try adding this to your shell configuration file (~/.bashrc, ~/.zshrc or ~/.fishrc) -

export RUBYOPT="-W0"

@tomchapin
Copy link
Author

tomchapin commented Jul 10, 2017

@athityakumar Thank you for that tip! I'm not comfortable with globally disabling Ruby warnings (since I'm a Ruby developer and need to know if my code is throwing warnings), but I think I found a happy compromise. I just added that environment variable directly to my colorls "lc" shell script in my .zshrc, like so:

lc() {
  eval 'RUBYOPT="-W0" colorls -l -a'
}

@athityakumar
Copy link
Owner

@tomchapin - These warnings are related to the gems used by colorls and not directly due to colorls. This may infact be the only happy workaround for now, unless the gems are updated too. (Or of course, you can also downgrade your Ruby version, but meh) 😄

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

No branches or pull requests

3 participants