Skip to content

chartkick loading problem #6

@wolffles

Description

@wolffles

I'm using chart kick in a standard way, like how the GitHub instructions dictate and it works in a local version. When uploaded to Heroku my charts produce an error "ReferenceError: Can't find variable: Chartkick" on the rendered partial page.

this is what I've done so far.

gemfile:

gem 'chartkick'
application.js:

//= require Chart.bundle
//= require chartkick
//= require_tree .
my show view renders a partial that calls a controller action via path method.

my controller action:

def event_names
@appleT = RegisteredApplication.find(params[:id])
render json: @applet.events.group(:name).count
end
my partial that calls the action:

<%= pie_chart event_names_registered_application_path %>
I'm thinking the reason I'm getting the "ReferenceError: Can't find variable: Chartkick?" is because of the asset pipeline. But I don't fully understand what i can do to solve it is. please help :D

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions