Archive for January, 2009
auto_complete with Rails 2.2
This page is about the auto_complete plugin for scriptaculous & Ruby on Rails 2.2. After looking through tons of pages and following countless dead links, here are the problems I had and how to fix them.
Error:
undefined method `text_field_with_auto_complete' for #<ActionView::Base:0x478d5e4>
Answer:
Install the auto_complete plugin.
command:ruby script/plugin install git://github.com/rails/auto_complete.git
Error:
ruby script/plugin install git://github.com/rails/auto_complete.git
removing: C:/Dropbox/My Dropbox/Ruby/mc/vendor/plugins/auto_complete/.git
Answer:
You don't have GIT installed. Its like a package manager. Get it from:http://git-scm.com/download
Error:
ruby script/plugin remove auto_complete
Plugin doesn't exist: C:/Dropbox/My Dropbox/Ruby/mcvendor/plugins/auto_complete
Answer:
Duh, it isn't installed. Install as directed above.
Error:
Just doesn't seem to work.
Answer:
Restart rails
Do the error logs tell you something?
Go over this article with a fine toothed comb:http://www.slash7.com/articles/2005/08/13/ajaxariffic-autocomplete-with-scriptaculous
Error:
ActionController::InvalidAuthenticityToken in your development.log
Answer:
There is a cross-site scripting protection that must be turned off.
Add this to your controller:
skip_before_filter :verify_authenticity_token
controversy
In a controversy the instant we feel anger we have already ceased striving for the truth, and have begun striving for ourselves. – Buddha
“President Bush accused Senator John Edwards, the newly chosen running mate of Senator John Kerry, the Democratic Party’s presidential candidate, of being too inexperienced. No one pointed out that prior to Bush’s election as president, his only political experience had been serving as governor of Texas, which was considered by many to be little more than a hand-holding position.” — July 7, 2004
No comments