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 I'm embedding ruby into inline javascript and it's coming up with a parse error. How should I be getting this ruby array into javascript?
I'm embedding this into an .html.erb file so ruby should be getting to the variable before javascript.
This is what safari console is showing:

Update
I had a form that had three fields js, css, and html respectively so I would put my javascript in a form and then it would put it into the header.
<head>
<%= @game.javascript %>
</head>
So as you can see I was embedding ruby in javascript that was the output of a ruby object so the reason ruby wasn't getting to it first was that it had already got to it and treated the <%= %> just like another string.
Ahh, I up voted you all for the help. Thanks!
<%=isn't being parsed if this is an erb file.