I’ve got a problem with Jquery. I’m using Rails 3.2.6, so Jquery is the new defaut.
My problem : I have a scaffolded controller named “sounds”, and on my “Show” view, i have a progress bar. I need it to be auto refresh, so some jquery should did the trick.
I included in the “sounds.js.coffee” this simple code =>
console.log($("#progressBar"))
So, on the url “/sounds” (index action), I got this response =
“[]”
(Its ok),
and on the url “/sounds/1/show” (show action), I got this error
“Uncaught ReferenceError: $ is not defined “, so i think Jquery is not
recognized.
I can’t understand what is the problem.. Is someone already got this prob, thanks to give me some hint and explanations.
UPDATE
I found the problem :
This line was at the top of sound.html.erb
<%= javascript_include_tag :sounds %> so double inclusion i think so.
I found the problem :
This line was at the top of sound.html.erb
<%= javascript_include_tag :sounds %>so double inclusion i guess.