rails 2.x (应该是2.1) 以后加入了 forgery protection authentication 功能,所有 post 到 controller action 的表单需带有 authenticity_token 字段。 该字段由 form_for 自动生成附加到表单中,可以通过观察 rails 生成的表单可以看到。 auto_complete 插件默认使用 post 动作请求提示项,但并不会附加该 authenticity_token,因此会产生错误,比较简便的解决方案就是把 text_field_with_auto_complete 请求动作更改为 get