unobtrusive javascript -> referencing instance varaiables

if i have a variable, such as: @text declared in my controller, how
would i go about dereferencing that in an .js.erb file?

i seem to see a lot of pages using: <%= @text %> to directly dereference
the value, but i can't seem to get it to work.. i get invalid symbol
errors (js errors) as soon as it hits "<%="..

any help? thanks!