Hi there, I have the following javascript_include_tags in my application.html.erb file: <%= javascript_include_tag ''jquery/jquery-1.3.2.min'', :cache => ''jquery'' %> <%= javascript_include_tag ''jrails'' %> <%= javascript_include_tag ''jquery/jquery.autocomplete.min'', :cache => ''jquery'' %> <%= javascript_include_tag ''mootools/mootools-1.2.1-core-yc'', :cache => ''mootools'' %> <%= javascript_include_tag ''mootools/mootools-1.2-more'', :cache => ''mootools'' %> <%= javascript_include_tag ''mootools/formcheck/formcheck'', :cache => ''mootools'' %> My question: How come, when I run the *production* environment on the (virtual private) server, the javascript files don''t seem to load? ("XYZ-is-not-a-fuction" errors) Hints: - When I delete the :cache options, the scripts DO load correctly. - When I''m in *development* mode, the whole problem doesn''t occur at all (I can have the :cache options). Thank you for your input! Tom -- Posted via http://www.ruby-forum.com/.
Rails List
2009-Aug-14 10:33 UTC
Re: How to: Handle javascript_include_tag in production mode
Try and give a different name for cache, it could be a name conflict. <%= javascript_include_tag ''jquery/jquery-1.3.2.min'', :cache => ''myjquery'' %> <%= javascript_include_tag ''mootools/mootools-1.2-more'', :cache => ''mymootools'' %> -- Posted via http://www.ruby-forum.com/.