简体   繁体   中英

What is this Rails deprecation warning?

I was trying to install Devise on my Rails app, and when running the command: rails generate devise_install the following message showed up:

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 /Users...

Can somebody help me with information (as detailed as possible would be appreciated) on how to proceed?

Thanks.

To remove the deprecation warning need to remove the plugin in your vendor folder.

For this link, How to Convert Simple Rails 2.3 Style Plugins for Rails 3.2

警告说,插件功能已在Rails 4.0中删除,因此请尝试使用gem而不是插件

Just wanted to add that if you're deploying on Heroku (possibly other hosts, don't know, I've only seen this on Heroku) you might still get this error even if you don't have a vendor/plugins folder.

This is because Heroku injects this gem:

'rails_12factor'

Which in turn installs these 2 gems:

rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.3)

Which seem to be the ones that trigger this warning.

I realize this may not be your case, but just wanted to post it here for other people who find this post while in that situation.

I guess this blog will help you in removing that deprecation warning:

http://bundler.io/v1.3/gemfile.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM