Question

I tried to install this dashing widget and I get the following error when I run dashing start

/var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:26:in `block (2 levels) in <top (required)>': undefined method `history' for Sinatra::Application:Class (NoMethodError)

So then I removed all aspects of this new widget (its folder in the /widgets directory, its job .rb file and the code in the .erb file). However this error persists and I am no longer able to even start my dashboard. This is a big problem for me. Can someone help me out?

EDIT:

The full error is

/var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:26:in `block (2 levels) in <top (required)>': undefined method `history' for Sinatra::Application:Class (NoMethodError)
        from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:25:in `open'
        from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:25:in `block in <top (required)>'
/usr/lib/ruby/1.9.1/psych.rb:203:in `parse': (history.yml): control characters are not allowed at line 1 column 1 (Psych::SyntaxError)
        from /usr/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
        from /usr/lib/ruby/1.9.1/psych.rb:151:in `parse'
        from /usr/lib/ruby/1.9.1/psych.rb:127:in `load'
        from /usr/lib/ruby/1.9.1/psych.rb:297:in `block in load_file'
        from /usr/lib/ruby/1.9.1/psych.rb:297:in `open'
        from /usr/lib/ruby/1.9.1/psych.rb:297:in `load_file'
        from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:31:in `<top (required)>'
        from config.ru:2:in `require'
        from config.ru:2:in `block in <main>'
        from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
        from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
        from config.ru:1:in `new'
        from config.ru:1:in `<main>'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
        from /var/lib/gems/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
        from /usr/local/bin/thin:23:in `load'
        from /usr/local/bin/thin:23:in `<main>'
Was it helpful?

Solution

I fixed this problem by renaming the old history file

mv history.yml history

and then restarting the server. In my case thats

rackup -p 3030 -s puma

The history.yml file didn't reappear until after I stopped the server. I checked it with nano and it was full of data. Sorry I can't shed any light as to why it may have happened. Server details. Ubuntu 13.10 32bit Desktop

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top