airblade / chartjs-ror

[Not supported - see #53] Simplifies using Chart.js in Rails
MIT License
184 stars 57 forks source link

undefined method `no_confict!' for Chartjs:Module #22

Closed austinarchibald closed 9 years ago

austinarchibald commented 9 years ago

As README says, I added:

# config/initializers/chartjs.rb
Chartjs.no_confict!

But I get undefined methodno_confict!' for Chartjs:Module (NoMethodError)`? File is correctly place, lines added to application.js. Server won't load. Was trying to add this to remove any conflict with chartkick.

airblade commented 9 years ago

That's weird. Are you on the latest version of chartjs-ror? What version of Rails are you running?

austinarchibald commented 9 years ago

using chartjs-ror 2.2.0 & Rails 4.2.2

b1592 commented 9 years ago

This may already been addressed elsewhere, but it seems to be a typo in the readme:

# config/initializers/chartjs.rb
Chartjs.no_conflict!

should do it.

austinarchibald commented 9 years ago

lol... I honestly had to look at what you typed for like 30 seconds, thinking to myself, it's exactly what I have in my initializer... hahaha that l is hard to spot! Unbelievable it was just that. And I didn't even see it.

Thank you!

airblade commented 9 years ago

Sorry about that! Well spotted @b1592.

It's fixed in 79f28cfd.