You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Hi all,
I've tried to integrate some xls data with dashboard, using some old post and modifying "sample.rb".
When I start "smashing start", I get the following error
I've the spreadsheet.xls in the root dir and all the permissions are fine.
I've installed roo and roo-xls via gem...but seems not working yet.
Please, someone has already passed through that?
Thanks in advance for your support
same error here...I don't know where the problem is.
I'm pointing to the right path of the xls file but seems that this sample.rb has something wrong. It's quite weird...
thanks sooooooooooooo much for your time. Now error is changed
Smashing start but this log
scheduler caught exception:
undefined local variable or method path' for main:Object Did you mean? patch /home/xxxxx/xxxxxxxxx/jobs/sample.rb:7:in block in <top (required)>'
/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in trigger_block' /var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in block in trigger'
/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
Thanks mate! I'm quite confident with folder structure. My only "concern" is that I've understand - reading a post - the the spreadsheet should be present in the dashboard/smashin "root" dir (so /home/xxxxx/smashing/). My fault :) I'll try and send u a feedback. Thanks so much
Activity
thefixxxer75 commentedon Jan 31, 2017
sample.rb
#!/usr/bin/env ruby
require 'roo'
SCHEDULER.every '2s' do
file_path = "/path/to/spreadsheet.xls"
def fetch_spreadsheet_data(path)
s = Roo::Excel.new(path)
send_event('valuation', { current: s.cell('B',49) })
end
module Handler
def file_modified
fetch_spreadsheet_data(path)
end
end
Gemfile
source 'https://rubygems.org'
gem 'smashing'
gem 'nagiosharder', :git => 'https://github.com/railsmachine/nagiosharder.git'
Remove this if you don't need a twitter widget.
gem 'twitter', '>= 5.9.0'
thefixxxer75 commentedon Jan 31, 2017
extension is xls, done with LibreOffice Calc
thefixxxer75 commentedon Jan 31, 2017
thanks for your reply!!
I've tried but here's results
SyntaxError: /home/xxxxxx/xxxxxxxxx/jobs/sample.rb:8: syntax error, unexpected ( arg, expecting '}'
send_event('valuation', { current: s.cell ('B',49) })
^
/home/xxxxxx/xxxxxxxx/jobs/sample.rb:8: syntax error, unexpected ',', expecting ')'
send_event('valuation', { current: s.cell ('B',49) })
^
/home/xxxxxx/xxxxxxxx/jobs/sample.rb:16: syntax error, unexpected end-of-input, expecting keyword_end
/var/lib/gems/2.3.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in
eval' /var/lib/gems/2.3.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:inload'/var/lib/gems/2.3.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in
load_rackup_config' /var/lib/gems/2.3.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:instart'/var/lib/gems/2.3.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in
run_command' /var/lib/gems/2.3.0/gems/thin-1.6.4/lib/thin/runner.rb:156:inrun!'/var/lib/gems/2.3.0/gems/thin-1.6.4/bin/thin:6:in
<top (required)>' /usr/local/bin/thin:23:inload'/usr/local/bin/thin:23:in `<top (required)>'
any idea about it? Syntax seems fine or am I wrong?
thx in advance
thefixxxer75 commentedon Feb 1, 2017
same error here...I don't know where the problem is.
I'm pointing to the right path of the xls file but seems that this sample.rb has something wrong. It's quite weird...
thefixxxer75 commentedon Feb 2, 2017
thanks sooooooooooooo much for your time. Now error is changed
Smashing start but this log
scheduler caught exception:
undefined local variable or method
path' for main:Object Did you mean? patch /home/xxxxx/xxxxxxxxx/jobs/sample.rb:7:inblock in <top (required)>'/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in
trigger_block' /var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:inblock in trigger'/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
Maybe refer to this one?
file_path = "#{Dir.pwd}/THIS_IS_THE_PATH_LOCATION_TO_THE_XLS_FILE/YOUR_FILENAME.xls"
thefixxxer75 commentedon Feb 3, 2017
my excel file is in /home/username/dashing/myfile.xls.
Is it correct?
thefixxxer75 commentedon Feb 3, 2017
Thanks mate! I'm quite confident with folder structure. My only "concern" is that I've understand - reading a post - the the spreadsheet should be present in the dashboard/smashin "root" dir (so /home/xxxxx/smashing/). My fault :) I'll try and send u a feedback. Thanks so much
thefixxxer75 commentedon Feb 3, 2017
error persist. File moved as suggested.
undefined local variable or method path' for main:Object Did you mean? patch /home/xxxxx/xxxxxxxxx/jobs/sample.rb:7:inblock in <top (required)>'