-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Excel data with dashing #737
Comments
Take a look at this thread https://github.com/Shopify/dashing/issues/735 I suspect the sample.rb and instructions you followed are a little out of date. |
Thanks for your quick reply :) I had a look at the issue #735 , and I tried to be as complient as possible with the environment used to resolve this issue. So first, I have downgraded 'roo' from 2.7 to 2.1 for being able tu run require 'roo'
require 'roo-xls'
SCHEDULER.every '2s', :first_in => 0 do |job|
file_path = "#{Dir.pwd}/spreadsheet.xls"
def fetch_spreadsheet_data(path)
s = Roo::Excel.new(path)
send_event('valuation', { current: s.cell(1, 2) })
end
module Handler
def file_modified
fetch_spreadsheet_data(path)
end
end I don't know which one of both modification resolved this, but anyway, I don't have any exception running 'dashing start' now. However, nothing is displayed in my dashboard. I have the following code in my sampletv.erb:
Am I doing something wrong with this part ? |
Before we go any further, is that all you have in the sampletv.erb? Do you have any other widgets showing aka the sample.erb dashboard contains the following `<% content_for(:title) { "My super sweet dashboard" } %>
Lastly are you running dashing or smashing? thanks |
No it's not the only widget displayed on my dashoard. Here is my complete sampletv.erb: <script type='text/javascript'>
$(function() {
// These settings override the defaults set in application.coffee. You can do this on a per dashboard basis.
Dashing.gridsterLayout('[{"col":2,"row":1,"size_x":1,"size_y":1},{"col":1,"row":1,"size_x":0,"size_y":0},{"col":3,"row":1,"size_x":1,"size_y":1},{"col":4,"row":1,"size_x":1,"size_y":1},{"col":1,"row":2,"size_x":1,"size_y":1},{"col":2,"row":2,"size_x":2,"size_y":1},{"col":4,"row":2,"size_x":1,"size_y":1}]')
Dashing.widget_base_dimensions = [370, 340]
Dashing.numColumns = 5
});
</script>
<% content_for :title do %>1080p dashboard<% end %>
<div class="gridster">
<ul>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-view="Clock"></div>
<i class="fa fa-clock-o icon-background"></i>
</li>
<li data-row="1" data-col="1" data-sizex="0.5" data-sizey="0.5">
<div data-view="Image" data-image="/sample.png"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="filter1" data-view="Number" data-title="Opened tasks"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="filter2" data-view="Number" data-title="Closed tasks"></div>
</li>
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
<div data-id="quote" data-view="Quote"></div>
</li>
<li data-row="1" data-col="2" data-sizex="1" data-sizey="1">
<div data-id="valuation" data-view="Number" data-title="Current Valuation" data-prefix="$"> </div>
</li>
</ul>
</div> I am running dashing; by the way, what is smashing exactly compare to dashing ? |
Ok, I know why it didn't display any value. I've forgotten one line in the .rb file. Now it's "almost" good. I can display values but only with line under 9. For exemple, Do you knwo if there is any limitation regarding this ? |
Good to hear that you are past the initial problem. See my previous post with links to Smashing & Dashing, you'll find out what that is all about. As for your new problem, that's beyond the scope of this thread and most likely smashing. Have a read of the roo documentation http://www.rubydoc.info/gems/roo/2.5.1 Personally I haven't accessed a spreadsheet table in this manner only individual cells |
Hi all,
I'm trying to get information from an Excel file and to display that into a dashing widget. I've seen that the best way would be to modify the sample.rb file. After many try and exceptions resolved, I'm stuck on an exception I didn't find on existing issues.
Here's my sample.rb file:
When I run
dashing start
, I have the following error message raised:C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:1311:in
'watch_filename': no file watching support on this system (EventMachine::Unsupported) from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:1311:in
watch_file'from D:/Projets/dashing/jobs/sample.rb:26:in
block in <top (required)>' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:977:in
call'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:977:in
block in run_deferred_callbacks' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:974:in
times'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:974:in
run_deferred_callbacks' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:194:in
run_machine'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.2-x86-mingw32/lib/eventmachine.rb:194:in
run' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/lib/thin/backends/base.rb:73:in
start'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/lib/thin/server.rb:162:in
start' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:87:in
start'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in
run_command' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/lib/thin/runner.rb:156:in
run!'from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thin-1.6.4/bin/thin:6:in
<top (required)>' from C:/Ruby22/bin/thin:23:in
load'from C:/Ruby22/bin/thin:23:in `
It seems that there is a compatibility issue with eventmachine. Does anyone has already face this issue ?
Thanks
The text was updated successfully, but these errors were encountered: