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

private method `terminal_size' called for #<HighLine:0x007fddf6d08758> (NoMethodError) #767

Closed
thathoo opened this issue Nov 23, 2015 · 11 comments

Comments

@thathoo
Copy link

@thathoo thathoo commented Nov 23, 2015

Sorry I dont have much more detail, other than pasting the stacktrace in here:

 - CheckWithoutProtection
 - CheckXMLDoS
 - CheckYAMLParsing
Checks finished, collecting results...
Generating report...
/Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman/util.rb:445:in `truncate_table': private method `terminal_size' called for #<HighLine:0x007fddf6d08758> (NoMethodError)
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman/report/report_table.rb:7:in `generate_report'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman/report.rb:73:in `generate'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman/report.rb:64:in `to_s'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman/report.rb:35:in `format'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman.rb:368:in `block in write_report_to_formats'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman.rb:367:in `each'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman.rb:367:in `write_report_to_formats'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman.rb:350:in `scan'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/lib/brakeman.rb:62:in `run'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/gems/brakeman-3.1.2/bin/brakeman:78:in `<top (required)>'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/bin/brakeman:23:in `load'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/bin/brakeman:23:in `<main>'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/bin/ruby_executable_hooks:15:in `eval'
    from /Users/thathoo/.rvm/gems/ruby-2.1.5-railsexpress/bin/ruby_executable_hooks:15:in `<main>'

Tested on:
Ruby: ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin13.0]
And Rails:
Rails 4.2.2
Rails 3.2.13

@oreoshake
Copy link
Contributor

@oreoshake oreoshake commented Nov 23, 2015

please wrap all of that in a block

* CheckWithoutProtection
* CheckXMLDoS
* CheckYAMLParsing Checks finished, collecting results... Generating report... 
...

See https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks

@thathoo
Copy link
Author

@thathoo thathoo commented Nov 23, 2015

Done, sorry about that - pasted in a hurry

@oreoshake
Copy link
Contributor

@oreoshake oreoshake commented Nov 23, 2015

❤️ no worries 👍

@presidentbeef
Copy link
Owner

@presidentbeef presidentbeef commented Nov 23, 2015

Please try upgrading Highline to 1.6.20 or later (see #761).

@presidentbeef
Copy link
Owner

@presidentbeef presidentbeef commented Dec 22, 2015

Assuming this was fixed by #762.

@psamim
Copy link

@psamim psamim commented Feb 7, 2016

I still have the same problem on brakeman 3.1.5.

@presidentbeef
Copy link
Owner

@presidentbeef presidentbeef commented Feb 7, 2016

@psamim what version of Highline is installed?

@psamim
Copy link

@psamim psamim commented Feb 8, 2016

$ gem query highline

*** LOCAL GEMS ***

highline (2.0.0.pre.develop.4, 1.7.8)
@presidentbeef
Copy link
Owner

@presidentbeef presidentbeef commented Feb 8, 2016

@psamim Yes, Brakeman is not compatible with Highline 2.0.0.pre.develop.4, that's why it explicitly depends on versions < 2.0. If you remove that gem it will be just fine. Or you could run with Bundler to pick up the correct dependencies.

@psamim
Copy link

@psamim psamim commented Feb 9, 2016

@presidentbeef Thanks, I removed it and it is just fine now. I do not know how 2.0.0.pre.develop.4 was installed.

Repository owner locked and limited conversation to collaborators Mar 15, 2016
@presidentbeef
Copy link
Owner

@presidentbeef presidentbeef commented Mar 22, 2016

If this happens again or someone else comes across this issue, try updating rubygems. This issue was fixed in 2.3.0: https://github.com/rubygems/rubygems/blob/master/History.txt#L532-L534

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.