Cómo agrupar complementos antiguos en el archivo Gem

I have a rails app and get this warning whenever I start the server or rake.

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /Users/Matt/Orchive/Orchive/config/environment.rb:5)

I understand that I need to move out a plugin, but I don't know how to do this. I have been to the link, but it does not give instructions.

Anyone have this problem and know how to fix it?

preguntado el 09 de marzo de 12 a las 14:03

2 Respuestas

Are you using heroku? Heroku adds some plugins which are rails 2.3 style hence you get this warning. They say that these plugins will be working when rails 4.0 is released. Also you can shut down this warning by adding this to your development.rb or production.rb file:

::ActiveSupport::Deprecation.silenced = true

respondido 09 mar '12, 14:03

Well the plugin is "acts-as-commentable-with-threading" or something. - Vasseurth

El mejor enfoque que he encontrado está documentado aquí.

Fui con el Que no sea una joya en absoluto parte, porque necesitaba poder activar / desactivar complementos durante mi implementación de capistrano, según el tipo de aplicación que estaba implementando. Antes usé config.plugins para especificar qué complemento usar. Con este enfoque, estoy usando un "require" en config.before_configuration en su lugar.

contestado el 22 de mayo de 12 a las 18:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.