gpt4 book ai didi

ruby-on-rails - Rails 2.3 风格的插件和弃用警告在 Heroku 中运行任务

转载 作者:行者123 更新时间:2023-12-03 04:20:37 25 4
gpt4 key购买 nike

我正在升级到 Rails 3.2,运行 rake db:migrate 会出现几个以下形式的错误:

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)

令人困惑的是我的 vendor/plugins 目录是空的——它引用了另一个插件目录吗?

最佳答案

你在使用 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)

rails_12factor gem 在 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)

就在 2013 年 8 月,heroku 总是在 Rails 3 应用程序中注入(inject)插件,甚至是带有推荐 gem 的应用程序。这是 ruby​​ buildpack 的一个问题,已由 PR 11 修复。 ,于2013-08-06合并。

关于ruby-on-rails - Rails 2.3 风格的插件和弃用警告在 Heroku 中运行任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9027403/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com