Rails 2.3风格的插件和弃用警告在Heroku中运行任务 [英] Rails 2.3-style plugins and deprecation warnings running task in Heroku
问题描述
DEPRECATION警告:我已经升级到Rails 3.2,并运行rake db:migrate,你在供应商/插件中有Rails 2.3风格的插件!在Rails 4.0中将会删除对这些插件的支持。将它们移出并将它们捆绑到Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。有关详情,请参阅发行说明: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released 。 (从/ app / Rakefile调用:7)
令人困惑的是我的 vendor / plugins
目录是空的 - 是否有另一个它引用的插件目录?
你在使用Heroku吗?
Heroku将在Rails 3.x应用程序中注入插件。
为了避免在Rails 3中注入
,在
应用程序中包含rails_12factor gem。 ( Heroku Ruby支持 2013-10-26)
rails 4中的rails_12factor gem也是必需的。
如果这个gem不是出现在您的应用程序中,您将在部署期间收到
警告,并且您的资产和日志不会成为
功能。 ( Heroku上的Rails 4 2013-10-26)
2013-08最近,heroku总是在rails 3应用中注入插件,甚至包含推荐的gem应用。这是ruby buildpack的一个问题,并且已经通过 PR 11 进行修复,并于2013年合并, 08-06。
I'm upgrading to Rails 3.2, and running rake db:migrate gives me several errors of the form:
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 at /app/Rakefile:7)
What's perplexing is that my vendor/plugins
directory is empty -- is there another plugins directory that it's referencing?
Are you using Heroku?
Heroku will inject plugins in Rails 3.x applications .. To avoid this injection in Rails 3, include the rails_12factor gem in your application. (Heroku Ruby Support 2013-10-26)
The rails_12factor gem is also required in rails 4.
If this gem is not present in your application, you will receive a warning while deploying, and your assets and logs will not be functional. (Rails 4 on Heroku 2013-10-26)
As recently as 2013-08, heroku always injected plugins in rails 3 apps, even apps with the recommended gems. This was an issue with the ruby buildpack, and was fixed by PR 11, merged on 2013-08-06.
这篇关于Rails 2.3风格的插件和弃用警告在Heroku中运行任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!