Topic: Pop up Message : Prototype could not be found

Hi there,
I am a complete novice to Ruby on Rails but i have been trying to clone an existing application that i paid a developer for, to another server (site5) and i have almost got it going but one of the remaining problems is a pop-up message (as below) every time you click on a page on the application. Application is at www.versatility.co.uk


CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).

If the source of the page is viewed, there is no mention of the prototype.js script but it is included in the javascripts in the public file which i am led to believe the javascript_include_tag looks for.

The previous set up used slightly older versions of rails and ruby. Site 5 uses rails 3.2.3 and ruby 1.8.7. All gems have been loaded that previous set up used. Any ideas on whats wrong ?

Last edited by bobuk (2012-06-22 07:18:11)

Re: Pop up Message : Prototype could not be found

I solved this problem. The application file within layouts was set to load the javascript defaults which should include prototype.js, but this file doesn't appear in the source code in the browser (still dont know why !).
I deleted the line which specifies defaults and called the javascripts required by name (including prototype.js) and everything worked fine.
I would still be interested to know why the defaults did not load prototype.js if anyone knows.