ChartKick.js错误:Sprockets :: Rails :: Helper :: AssetNotPrecomleciled -Chartkick.js:
我正在努力将现有应用程序升级到最新版本,并在下面的以下错误上粘贴。我在这里找到了一些示例 1 | 2 | 3 ----不幸的是,这些示例没有工作为我。
*当前错误:
Sprockets::Rails::Helper::AssetNotPrecompiled - chartkick.js:
app/views/layouts/application.html.haml:5:in '_app_views_layouts_application_html_haml__3032669070778132401_2208319440'
有关如何解决ChartKick.js的任何建议?
应用
!!!
%html
%head
%title EffortForecast
= javascript_include_tag "http://www.google.com/jsapi", "chartkick"
= javascript_include_tag "https://www.gstatic.com/charts/loader.js"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body
= render 'layouts/login_modal'
%section
= render 'layouts/header'
= content_for :subnav
%section.container-fluid
.flash-messages= render 'layouts/flash_messages'
= yield
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap-sprockets
//= require Chart.bundle
//= require chartkick
//= require turbolinks
//= require_tree .
//= require_self
Turbolinks.enableProgressBar();
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.8'
# Use postgresql as the database for Active Record
gem 'pg', '0.18.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem "haml"
gem "omniauth"
gem "omniauth-github"
gem "omniauth-google-oauth2", '~> 0.8.0'
gem "omniauth-openid"
gem "google-api-client"
gem "cancancan"
gem 'bootstrap_form'
gem 'friendly_id', '~> 5.0.0'
gem 'ransack'
gem 'rdiscount', require: 'tilt/rdiscount'
gem 'ruby_identicon'
gem 'sidekiq'
gem "refile", require: "refile/rails"
gem "refile-mini_magick"
gem 'simple_form'
gem 'active_link_to'
gem 'chartkick'
gem 'groupdate'
gem 'faker'
# gem 'skylight'
gem 'bundler', '>= 2.0.0.pre.3'
gem 'bootstrap-sass', '~> 3.4.1'
gem 'sassc-rails', '>= 2.1.0'
gem "font-awesome-rails"
# bring back removed support for respond_with
# gem 'responders', '~> 2.0'
group :production do
gem 'rails_12factor'
gem 'puma'
end
group :development do
gem 'guard'
gem 'guard-minitest'
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
gem 'pry-rails'
end
ruby "2.5.0"
I am working on upgrading an existing application to the most current versions and stuck on the following error below. I have found some examples here 1 | 2 | 3 --- Unfortunately none of these examples work for me.
*Current Error:
Sprockets::Rails::Helper::AssetNotPrecompiled - chartkick.js:
app/views/layouts/application.html.haml:5:in '_app_views_layouts_application_html_haml__3032669070778132401_2208319440'
Any suggestions on how to resolve the chartkick.js?
application.html.haml
!!!
%html
%head
%title EffortForecast
= javascript_include_tag "http://www.google.com/jsapi", "chartkick"
= javascript_include_tag "https://www.gstatic.com/charts/loader.js"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body
= render 'layouts/login_modal'
%section
= render 'layouts/header'
= content_for :subnav
%section.container-fluid
.flash-messages= render 'layouts/flash_messages'
= yield
application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap-sprockets
//= require Chart.bundle
//= require chartkick
//= require turbolinks
//= require_tree .
//= require_self
Turbolinks.enableProgressBar();
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.8'
# Use postgresql as the database for Active Record
gem 'pg', '0.18.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem "haml"
gem "omniauth"
gem "omniauth-github"
gem "omniauth-google-oauth2", '~> 0.8.0'
gem "omniauth-openid"
gem "google-api-client"
gem "cancancan"
gem 'bootstrap_form'
gem 'friendly_id', '~> 5.0.0'
gem 'ransack'
gem 'rdiscount', require: 'tilt/rdiscount'
gem 'ruby_identicon'
gem 'sidekiq'
gem "refile", require: "refile/rails"
gem "refile-mini_magick"
gem 'simple_form'
gem 'active_link_to'
gem 'chartkick'
gem 'groupdate'
gem 'faker'
# gem 'skylight'
gem 'bundler', '>= 2.0.0.pre.3'
gem 'bootstrap-sass', '~> 3.4.1'
gem 'sassc-rails', '>= 2.1.0'
gem "font-awesome-rails"
# bring back removed support for respond_with
# gem 'responders', '~> 2.0'
group :production do
gem 'rails_12factor'
gem 'puma'
end
group :development do
gem 'guard'
gem 'guard-minitest'
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
gem 'pry-rails'
end
ruby "2.5.0"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论