9

重複の可能性:
Rails2.3スタイルのプラグインとHerokuでタスクを実行している非推奨の警告

rake db:migrateを実行していると、次の警告が表示されてから中止されます。

$ 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空です

4

3 に答える 3

20

質問のタイトルが原因で、人々が検索エンジンからここにたどり着いた場合の参考までに。非推奨の警告は、Heroku がプラグインを挿入することによって引き起こされます - この質問に対する Jared Beck の回答を参照してください: Rails 2.3-style plugins and deprecation warnings running task in Heroku

上記のnzifabによって提案された解決策は、根本的な問題に対して有効ですが、これは質問のタイトルで提起されたものではありませんでした

于 2012-09-21T10:06:44.357 に答える
2

vendor/pluginsここでの問題ではありません、それらは単なる警告です。それはheroku run rake db:migrate..

おそらくheroku rake db:migrateあなたがCedarスタックにいない場合(注migrate、ではなくmigration

于 2012-04-10T21:01:22.083 に答える
1

これについて私が感じるのは、gem のいずれかでいくつかの変更を行い、「..app/vendor/plugins」フォルダーに変更を加えた階層とファイルをコピーしたに違いないということです。

この場合、これは「lib」フォルダーにプラグインをコピーする必要があることを伝える単なる警告です。開発モードで webrick を起動したときにも、同じことを見たことがあるはずです。

于 2012-10-01T05:26:15.637 に答える