I need to get a ruby array in to a javascript array and I\'m getting a parse error.
var characters = <%= @poop.to_json %>;
That is how
Ideally, we need more information to properly answer, but I'm going to guess some stuff to help you...
Assumption #1: You are using erb syntax (those "<%=" and "%>") in a .js file. These aren't parsed by Rails into anything meaningful.
What you want to do, is use inline JS in your template or view. Javascript generation from other languages can be tricky though, use with caution.