'Sprockets cannot precompile chartkick
I am using chartkick
(added gem 'chartkick'
in my Gemfile) and have defined it in my views/layouts/application.html.erb
like this:
<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
But on running the server, it results in an error:
Sprockets::Rails::Helper::AssetNotPrecompiled in Main#index
chartkick.js
I am using rails 5.0.7
. I tried following the way mentioned in https://chartkick.com/#rails-5-sprockets. But still, it results in the same error.
Can you help me in finding what I'm doing wrong?
Or If anyone could tell me what direction should I head to, that would be awesome as well.
UPDATE: Adding config.assets.check_precompiled_asset = false
fixes the issues.
But, adding this line means it will not verify/check precompiled_assets. Which is not a good thing, is it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|