重複の可能性:
Rails 2.3 スタイルのプラグインと非推奨の警告を削除する
Heroku (keilmiller.herokuapp.com) の Rails 3.2.8 アプリに問題があります。
pg
、thin
およびforeman
本番用の gemfile に必要です。
シダースタックを使用しています。新しいアプリをherokuにプッシュしました--force
. heroku pg:reset SHARED_DATABASE
古いデータベースを削除するために実行しました。heroku run rake db:migrate
やその他の rake コマンドを実行すると、エラーが発生します。
非推奨の警告: ベンダー/プラグインに Rails 2.3 スタイルのプラグインがあります!
Railsプラグインはありません。過去にこのような問題があったことは知っていますが、Heroku はサポートをスタック オーバーフローに変更したと思います。Heroku で古いチケットを表示できなくなりました。どんな助けでも大歓迎です。
アプリが停止するのはなぜですか?
編集: Heroku からアプリを削除し、cedar スタックで別のアプリを作成しました。新たなスタート。ローカル アプリを heroku にプッシュしました。ページを表示しようとするとアプリケーション エラーが発生し、heroku run rake
コマンドを実行しようとするとプラグイン エラーが発生します。
編集: ruby バージョンとの互換性に何らかの問題があるのではないかと考えました。ログ ファイルにはディレクトリfrom /app/vendor/bundle/ruby/1.9.1
がありますがheroku run "ruby -v"
、1.9.2 が生成されました。ruby 1.9.3 を含むように gemfile を更新し、heroku にプッシュしました。Heroku は実際に私のローカル環境と同じように 1.9.3 を実行していますが、出力されるログは同じです。
編集:データベースを再度消去し、heroku アプリを再起動して、新しいログを取得しました。
編集: Carrierwave イニシャライザに問題がありました。修理済み。押した。新しいログを投稿しました。/app/app/helpers/application_helper.rb:2:in
': 初期化されていない定数 FoundationRailsHelper::FlashHelper (NameError) Something is going on I think with this statement in my application helper
include FoundationRailsHelper::FlashHelper` using https://github.com/sgruhier/foundation_rails_helper dev モードで完全に動作します。
現在のログ -+-+-+-+-+-+-+-+-+-+
$ heroku logs
2012-09-28T00:18:17+00:00 app[web.1]: from /app/app/helpers/application_helper.rb:1:in `<top (required)>'
2012-09-28T00:18:17+00:00 app[web.1]: /app/app/helpers/application_helper.rb:2:in `<module:ApplicationHelper>': uninitialized constant FoundationRailsHelper::FlashHelper (NameError)
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:131:in `map!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `block in inherited'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:159:in `default_helper_module!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:95:in `helper'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `class_eval'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `inherited'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/hide_actions.rb:32:in `inherited'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:135:in `inherited'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:1:in `<top (required)>'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-09-28T00:18:17+00:00 app[web.1]: from config.ru:3:in `require'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-09-28T00:18:17+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-09-28T00:18:17+00:00 app[web.1]: from config.ru:1:in `<main>'
2012-09-28T00:18:17+00:00 app[web.1]: from config.ru:1:in `new'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `load'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-09-28T00:18:17+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2012-09-28T00:18:18+00:00 heroku[web.1]: Process exited with status 1
2012-09-28T00:18:18+00:00 heroku[web.1]: State changed from starting to crashed
2012-09-28T00:22:06+00:00 heroku[web.1]: State changed from crashed to starting
2012-09-28T00:22:09+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 3734`
2012-09-28T00:22:14+00:00 app[web.1]: 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/config/environment.rb:5)
2012-09-28T00:22:14+00:00 app[web.1]: 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/config/environment.rb:5)
2012-09-28T00:22:14+00:00 app[web.1]: 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/config/environment.rb:5)
2012-09-28T00:22:16+00:00 app[web.1]: /app/app/helpers/application_helper.rb:2:in `<module:ApplicationHelper>': uninitialized constant FoundationRailsHelper::FlashHelper (NameError)
2012-09-28T00:22:16+00:00 app[web.1]: from /app/app/helpers/application_helper.rb:1:in `<top (required)>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `class_eval'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:95:in `helper'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `block in inherited'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:159:in `default_helper_module!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:22:in `inherited'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/helpers.rb:131:in `map!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/hide_actions.rb:32:in `inherited'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:1:in `<top (required)>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:135:in `inherited'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-09-28T00:22:16+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2012-09-28T00:22:16+00:00 app[web.1]: from config.ru:3:in `require'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start'
2012-09-28T00:22:16+00:00 app[web.1]: from config.ru:1:in `new'
2012-09-28T00:22:16+00:00 app[web.1]: from config.ru:1:in `<main>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `load'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
2012-09-28T00:22:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
2012-09-28T00:22:17+00:00 heroku[web.1]: Process exited with status 1
2012-09-28T00:22:17+00:00 heroku[web.1]: State changed from starting to crashed
2012-09-28T00:27:50+00:00 heroku[web.1]: State changed from crashed to starting
2012-09-28T00:27:53+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 55735`
答え
諸事情により、このスレは閉鎖いたしました。私は本当にスタックオーバーフローが好きではありません。とにかく、「答え」は宝石を資産グループから移動することです。思わず入れてしまいました。問題を解決しました。何かが初期化されていない、または欠落しているという警告が表示された場合は、gem が本番環境に含まれているかどうかを確認してください。