airblade/chartjs-ror

"couldn't find file 'chart' with type 'application/javascript'" in controller specs

Closed this issue · 6 comments

Hi,

I've just encountered this error message on a brand new rails 4.2.4 project while running controller specs that render views:

ActionView::Template::Error:
       couldn't find file 'Chart' with type 'application/javascript'

It happens at the line that requires Char in my application.js

It apparently works fine in development mode and when I remove the Chart and excanvas requires from my application.js, and breaks when one or the other is set.

I'm trying to figure out what's going wrong, and I'll be sure to send a PR if I solve it.

I've only ever tried chartjs-ror in a Rails 3.2 app so I'm looking forward to your finding out the solution!

Me too ^^° apparently chart-js-rails has the same problem by the way.

Another thing: I'm using the jquery gem along with zurb foundation, turbolinks, etc. ; all of these require their js with no fuss.

False alarm, someone had the bright idea to put the gem in development mode only...

By the way: it works like a charm on rails 4.2.4 ^^d (once you've got the gem in all modes ^^)

That's good to know, thanks!