"Ajax is not defined" problem


I want to call Ajax.Request from my javascript function defined in "/
javascripts/application.js" but I still get the same error on my
firebug console: "Ajax is not defined".
As I know Ajax class is defined in /javascripts/prototype.js library
which is within the same dir as my script.
Both scripts has been also included on the generated page - I have
checked it on the page source.

Is there something missed?


Do <%= javascript_include_tag :defaults %> on your page rather than including both files.

It sounds to me like it’s not including the prototype one.