gon icon indicating copy to clipboard operation
gon copied to clipboard

undefined variable include_gon

Open Tshamp7 opened this issue 4 years ago • 1 comments

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?

Tshamp7 avatar Jul 26 '20 08:07 Tshamp7

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'

unixneo avatar Nov 10 '20 09:11 unixneo