Ruby on rails 可以注释掉“wrap_参数”初始值设定项吗?

Ruby on rails 可以注释掉“wrap_参数”初始值设定项吗?,ruby-on-rails,ruby-on-rails-3.2,thin,foreman,rails-api,Ruby On Rails,Ruby On Rails 3.2,Thin,Foreman,Rails Api,我在与Foreman和Thin启动Rails API应用程序时遇到了这个错误 AM@~/Documents/RailsWS/app1229 >foreman start 09:47:39 web.1 | started with pid 773 09:47:44 web.1 | => Booting Thin 09:47:44 web.1 | => Rails 3.2.8 application starting in development on http:/

我在与Foreman和Thin启动Rails API应用程序时遇到了这个错误

AM@~/Documents/RailsWS/app1229 >foreman start
09:47:39 web.1  | started with pid 773
09:47:44 web.1  | => Booting Thin
09:47:44 web.1  | => Rails 3.2.8 application starting in development on   
  http://0.0.0.0:5000
09:47:44 web.1  | => Call with -d to detach
09:47:44 web.1  | => Ctrl-C to shutdown server
09:47:45 web.1  | Exiting
09:47:45 web.1  | 
 /Users/AM/Documents/RailsWS/app1229/config/initializers/wrap_parameters.rb:8:in 
 `block in <top (required)>': undefined method `wrap_parameters' for 
 ActionController::API:Class (NoMethodError)
这似乎解决了眼前的问题,因为瘦服务器启动并运行。但是,我不确定这会对应用程序产生什么影响。在使用Rabl gem服务器JSON的Rails API应用程序中这样做安全吗


我也引用了。

我放弃了rails api项目,现在我将其改写为一个完整的rails应用程序。

bundle exec thin start或bundle exec rails server thin是否出现了相同的错误?是的,我在这些建议的命令中也遇到了完全相同的错误。您使用的rails版本是什么?我使用的是rails api应用程序。当我在项目目录中输入rails-v时,版本显示为3.2.8?这意味着什么,兄弟:/
ActiveSupport.on_load(:action_controller) do
  #wrap_parameters format: [:json] 
end