使用 Ruby 1.9.2 和 Rails 3 -
尝试使用时<%= error_messages_for 'story' %>
出现此错误:
DEPRECATION WARNING: error_messages_for was removed from Rails and is now available as a plugin. Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`. (called from _app_views_stories_new_html_erb__1042605186_33967248__100840187 at C:/Ruby192/shovell/app/views/stories/new.html.erb:1)
所以我做了它所说的并运行插件安装。但是现在我有一个空的 dynamic_form 文件夹vendor/plugins
。我尝试使用http
而不是git
没有运气。我还在/
URL 的末尾添加了一个对在线其他人有用的 URL,但没有运气。
我添加gem dynamic_form
到Gemfile
andrequire "dynamic_form"
以及application.rb
rerun bundle install
。它显示 dynamic_form-1.1.3 已安装到 `lib/ruby/gems/1.9.1/gems/' 但我仍然遇到同样的错误。