我按照https://chartkick.com/中的文档进行了全新的Rails 6安装,但是得到了以下信息:
Webpacker can't find chartkick in /home/sbstn/codes/desafio_latam/g24/chart_demo/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
"application.js": "/packs/js/application-0db4c39e559fa03658c6.js",
"application.js.map": "/packs/js/application-0db4c39e559fa03658c6.js.map",
"entrypoints": {
"application": {
"js": [
"/packs/js/application-0db4c39e559fa03658c6.js"
],
"js.map": [
"/packs/js/application-0db4c39e559fa03658c6.js.map"
]
}
}
}
我对以下内容进行了部分制作,并在ActiveAdmin面板中进行了渲染:
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag "application", "chartkick" %>
<% my_chart = {"ejemplo1": 20, "ejemplo2": 30} %>
<%= bar_chart my_chart %>
但是正式文档中简单的简单示例在普通视图上也不起作用。
能否请您提供一些有关如何将chartkick与webpacker和activeadmin集成的建议
答案 0 :(得分:0)
这是我的错。即使您添加了纱线要求,也必须添加宝石。
谢谢