Rails 2.3风格的插件:为什么弃用警告?

时间:2012-12-13 17:11:20

标签: ruby-on-rails heroku

在部署到Heroku时,我收到一组关于vendor / plugins文件夹的弃用警告(见下文)。我有一个.gitkeep声明,没有别的。有什么我需要做的吗?

2012-12-13T02:56:59+00:00 app[web.1]: 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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-12-13T02:56:59+00:00 app[web.1]: 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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-12-13T02:56:59+00:00 app[web.1]: 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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)

2 个答案:

答案 0 :(得分:3)

Heroku已经指出了这一点,他们已经在为Rails 4开发它了

Heroku通过注入插件来工作,这会导致这种情况发生

-----> Rails plugin injection
       Injecting rails_log_stdout
       Injecting rails3_serve_static_assets

Rails 2.3-style plugins and deprecation warnings running task in Heroku

答案 1 :(得分:0)

我刚刚注意到Heroku现在有一个解决方法。

   Injecting plugin 'rails_log_stdout'
   Injecting plugin 'rails3_serve_static_assets'
   Add 'rails_12factor' gem to your Gemfile to skip plugin injection