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

Crashes with NoMethodError on Ruby 2.0 and OS 10.9 #51

Open
jergason opened this issue Dec 23, 2013 · 2 comments
Open

Crashes with NoMethodError on Ruby 2.0 and OS 10.9 #51

jergason opened this issue Dec 23, 2013 · 2 comments

Comments

@jergason
Copy link

I installed Riemann v0.2.4 with Homebrew on Mac OS 10.9.1, installed riemann-dash with gem install --no-ri --no-rdoc riemann-dash, started it with riemann-dash and visited it at http://localhost:4567. It looks like something is rendering incorrectly when viewed in the web browser:

screen shot 2013-12-23 at 12 50 00 pm

The sinatra server crashes with a NoMethodError. Here is the stack trace:

NoMethodError - undefined method `empty?' for nil:NilClass:
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/tree/root_node.rb:23:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/engine.rb:299:in `_render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/engine.rb:246:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/css.rb:24:in `evaluate'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:805:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:684:in `scss'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/riemann-dash-0.2.6/lib/riemann/dash/controller/css.rb:3:in `block in <class:App>'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:in `block in compile!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `[]'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (3 levels) in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in `route_eval'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (2 levels) in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:997:in `block in process_route'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `process_route'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:955:in `block in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `each'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1067:in `block in dispatch!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1064:in `dispatch!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `block in call!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `call!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:877:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/riemann-dash-0.2.6/lib/riemann/dash/rack/static.rb:9:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/xss_header.rb:18:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/path_traversal.rb:16:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/json_csrf.rb:18:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/frame_options.rb:31:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/show_exceptions.rb:21:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:180:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:2004:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `block in call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1778:in `synchronize'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:82:in `block in pre_process'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in `pre_process'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `block in spawn_threadpool'

Looking in the chrome dev console shows a 500 error when trying to get /css:

screen shot 2013-12-23 at 12 55 15 pm

@jergason
Copy link
Author

Installing riemann-dash with Ruby 1.9.3 works fine, so it seems to be an issue with Ruby 2.0.

@aphyr
Copy link
Collaborator

aphyr commented Dec 23, 2013

I haven't tried 2.0 yet but that's good to know. Wonder if it's a bug in my SASS code or the SASS gem or what...

Jamison Dance [email protected] wrote:

Installing riemann-dash with Ruby 1.9.3 works fine, so it seems to be an issue with Ruby 2.0.


Reply to this email directly or view it on GitHub.

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