0

可能重复:
消除 Rails 2.3 风格的插件和弃用警告

我对 Heroku (keilmiller.herokuapp.com) 上的 rails 3.2.8 应用程序有疑问。

pgthin并且foreman在我的 gemfile 中用于生产。

我正在使用雪松堆栈。我将我的新应用程序推到了 heroku 上--force。我跑去heroku pg:reset SHARED_DATABASE清除我的旧数据库。Runningheroku 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.1heroku run "ruby -v"产生 1.9.2。我更新了我的 gemfile 以包含 ruby​​ 1.9.3 并推送到 heroku。Heroku 确实像我的本地环境一样运行 1.9.3,但它输出的日志仍然相同。

编辑:我再次清除了数据库,重新启动了 heroku 应用程序,并获得了一个新日志。

编辑:我的载波初始化程序有问题。固定的。推。发布新日志。/app/app/helpers/application_helper.rb:2:in': uninitialized constant FoundationRailsHelper::FlashHelper (NameError) Something is going on I think with this statement in my application helperinclude FoundationRailsHelper::FlashHelper` 使用https://github.com/sgruhier/foundation_rails_helper它在开发模式下完美运行。

当前日志 -+-+-+-+-+-+-+-+-+-+

$ 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 是否包含在生产中。

4

1 回答 1

0

这个答案肯定完全解决了您最初关于 Heroku 部署的弃用警告的问题。基本上,只需忽略这些,直到 Heroku 决定开始更新它们。

如果您在本地构建中没有收到这些警告,那么它们只是 Heroku 正在使用的旧插件。

于 2012-09-27T22:17:45.043 回答