gon
gon copied to clipboard
undefined variable include_gon
Hello! Hopefully someone can help me with this because this was going to make implementing stripe a little easier for me! So I tried to install gon so that i could pass variables to my view from my controller and have them be accessible in my JS, but, after installing the gem and defining some variables, I just keep getting and "undefined variable <%= include_gon %>" error message.
Im using the most current version of ruby and rails.
Is there something else I have to do that Im missing?
This typically happens when you have not included the gon gem, for example, perhaps you forgot to this this to. your code:
gem 'gon', '6.2.0'
require 'gon'