Um, if you are calling AJAX functions and Javascript response, you must use RJS. I’ll ignore the errors you are having and just answer your first issue: trying to get page hits faster, more caching of javascript. For that, please check out the Unobtrusive Javascript plugin here: http://www.ujs4rails.com/2006/8/21/announcing-ujs-rails-plugin-0-3
This puts the javascript for such calls as #link_to_function and #link_to_remote into a javascript file which can be cached by the browser. Give this plugin a try and let us know if you still have issues.
Jason