ripienaar / gdash

A dashboard for Graphite

Home Page:http://www.devco.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined method `list' for nil:NilClass: open my dashboard

gboesebeck opened this issue · comments

Hi,

ive got a problem to open my dashboard. Gdash throw the following error.

172.17.151.173 - - [10/May/2012 16:43:23] "GET /favicon.ico HTTP/1.1" 404 462 0.0010
172.17.151.173 - - [10/May/2012 16:43:25] "GET /fs/ HTTP/1.1" 404 454 0.0009
NoMethodError - undefined method list' for nil:NilClass: /opt/gdash/lib/gdash/sinatra_app.rb:128:inblock in class:SinatraApp'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:inblock in compile!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in []' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:inblock (3 levels) in route!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in route_eval' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:inblock (2 levels) in route!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in block in process_route' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:incatch'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in process_route' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:inblock in route!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in each' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:inroute!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in dispatch!' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:inblock in call!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in block in invoke' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:incatch'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in invoke' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:incall!'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/head.rb:9:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.2/lib/sinatra/showexceptions.rb:21:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/lint.rb:48:in_call'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/lint.rb:36:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/showexceptions.rb:24:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/chunked.rb:43:incall'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/content_length.rb:14:in call' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:inservice'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
172.17.151.173 - - [10/May/2012 16:43:25] "GET /sinatra/404.png HTTP/1.1" 500 114283 0.0496
172.17.151.173 - - [10/May/2012 16:43:25] "GET /favicon.ico HTTP/1.1" 404 462 0.0012

The template directory:

fs
+- dash.yaml
+- cpu.graph

The app started with bundle exec rackup, with passenger ive got the same problem,

thx,
Gerrit

Is that the entire directory where the config is pointing at? That isnt at all like the README says it should look.

Thats thats the entire directory, my template dir is

Did i need a toplevel dir, like so?

base dir: /data/gdash/templates/

virtualization
| +-- fs
| +-- dash.yaml
| +-- cpu.graph
+-- dash.yaml
+-- cpu.graph

The example in the readme would have a config setting like:

:templatedir: /path/to/my/graph_templates

Just make yours the same

My templatedir setting pointed to /data/gdash/templates/,. but in the dir is only the folder fs, with the two files (gdash.yaml & cpu.graph) in the fs dir. Is thats the problem? Try it tomorrow.

I really can only keep saying you should make it like the README. Please respond here if after doing that it still does not work.

I was wrong actually in my previous comment, ignore it.

It seems that github markdown parser have made lines for kvm1 misaligned in README: https://github.com/ripienaar/gdash#template-directory-layout

Ok will fix the markup thx

updated the readme looks better now in the MD view

Thank you!

the problem was the files in the top directory.

Thx for the quick response.