GithubHelp home page GithubHelp logo

Chartkick is not defined about chartkick HOT 13 CLOSED

ankane avatar ankane commented on May 2, 2024
Chartkick is not defined

from chartkick.

Comments (13)

olivierbuffon avatar olivierbuffon commented on May 2, 2024

Same issue for me, I tried to put it in different places ... without success.

from chartkick.

ankane avatar ankane commented on May 2, 2024

What OS and browser?

from chartkick.

olivierbuffon avatar olivierbuffon commented on May 2, 2024

OS X Mountain Lion, Google Chrome for me.

from chartkick.

elsom25 avatar elsom25 commented on May 2, 2024

OSX Mountain Lion, Google Chrome Version 26.0.1410.65

from chartkick.

ankane avatar ankane commented on May 2, 2024

Be sure to include the Chartkick JS before you call the helper methods. I'll add that to the docs for now and possibly remove this requirement in the future.

from chartkick.

maxmcd avatar maxmcd commented on May 2, 2024

Same problem, tested in Firefox, Chrome, and Safari. Location of the include doesn't seem to make a difference.

Ruby 1.9.3p286
Rails 3.2.12

Using JQuery, JQuery UJS, and Bootstrap

from chartkick.

maxmcd avatar maxmcd commented on May 2, 2024

My mistake. The docs clearly mention including the javascript in the views and I have it placed in the head. Moving the include tag into the body but before the helper method fixes the issue for me.

from chartkick.

ankane avatar ankane commented on May 2, 2024

The head should be fine. I'll take a look at it tonight and see why it's not.

from chartkick.

krainboltgreene avatar krainboltgreene commented on May 2, 2024

Ditto here, head didn't work, body did.

from chartkick.

olivierbuffon avatar olivierbuffon commented on May 2, 2024

Thank you all, place it in the body is working for me :) 👍

from chartkick.

ankane avatar ankane commented on May 2, 2024

Fixed with 71c8b74. Try installing version 0.0.4.

from chartkick.

mknyein avatar mknyein commented on May 2, 2024

We have to change config.serve_static_files = true in production.rb.

from chartkick.

AstmDesign avatar AstmDesign commented on May 2, 2024

I fixed it by added the
<%= javascript_include_tag 'application' %>
inside the <head></head> tags instead of the end of the page

from chartkick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.