弃用警告:你的Rails 2.3风格的插件,供应商/插件! 支持将在Rails的4.0 [复制]

2019-07-28 22:13发布

可能重复:
Rails的2.3式的插件和在Heroku上运行的任务废弃警告

我正在耙分贝:迁移给我下面的警告,然后中止:

$ heroku rake db:migration --trace
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support forthese 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/Rakefile:7)
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/Rakefile:7)
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/Rakefile:7)
rake aborted!
Don't know how to build task 'db:migration'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:115:in`invoke_task'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/bin/rake:19:in `load'
/app/.bundle/gems/ruby/1.9.1/bin/rake:19:in `<main>'

当我检查vendor/plugins文件夹,我只找到一个名为.gitkeep是空的

Answer 1:

vendor/plugins是不是问题就在这里,那些只是warnins。 它heroku run rake db:migrate ..

可能只是heroku rake db:migrate ,如果你不是雪松堆栈(注意migrate ,而不是migration



Answer 2:

作为一个供参考的情况下,人们来到这里,从搜索引擎,由于问题的标题。 弃用警告是由注射的Heroku插件引起的-见贾里德·贝克对这一问题的回答: Rails的2.3式的插件和在Heroku上运行的任务废弃警告

通过上述nzifab提出的解决方案是有效的根本问题,但这是不是在这个问题标题提出



Answer 3:

我觉得这是,你必须作出任何宝石的一些变化和复制的层级,并在“..app /供应商/插件”的文件夹更改的文件。

如果是这样的话,那么这只是一个警告,告诉你应该在“LIB”文件夹复制插件。 当你开始在开发模式下的WEBrick你一定看到了同样的。



文章来源: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support will be removed in Rails 4.0 [duplicate]