可能重复:
eliminating Rails 2.3-style plugins and deprecation warnings
我在Heroku(keilmiller.herokuapp.com)上使用rails 3.2.8应用程序时出现问题。
我的gemfile中需要 pg
,thin
和foreman
才能进行制作。
我正在使用雪松堆。
我用--force
将我的新应用推送到了heroku。
我运行heroku pg:reset SHARED_DATABASE
来删除我的旧数据库。
运行heroku run rake db:migrate
或任何其他rake命令会产生错误。
弃权警告:您在供应商/插件中拥有Rails 2.3风格的插件!
我没有任何rails插件。我知道过去我有这样的问题,但我猜Heroku改变了对堆栈溢出的支持。我无法再用Heroku查看我的旧门票了。任何帮助将不胜感激。
为什么我的应用暂停?
编辑:我刚刚从heroku删除了我的应用程序,并使用雪松堆栈创建了另一个应用程序。全新的开始。推送我的本地应用程序到heroku。尝试查看页面时出现应用程序错误,当我尝试运行heroku run rake
命令时仍然出现插件错误。
编辑:我认为可能存在某种与ruby版本不兼容的问题。日志文件的目录为from /app/vendor/bundle/ruby/1.9.1
,但heroku run "ruby -v"
产生了1.9.2。我更新了我的gemfile以包含ruby 1.9.3并推送到heroku。 Heroku确实像我的本地env一样运行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
包含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`
ANSWER
出于某种原因,此线程已关闭。我真的不喜欢堆栈溢出。无论如何,“答案”应该是将宝石从资产组中移出。我不假思索地把它放在那里。解决了这个问题。现在我知道,如果有关于某些内容未被初始化或丢失的警告,请检查该宝石是否包含在生产中。
答案 0 :(得分:0)
This answer肯定完全解决了有关Heroku部署的弃用警告的初始问题。基本上,只要忽略这些,直到Heroku决定更新它们。
如果您没有在本地版本上收到这些警告,那么它们只是Heroku使用的旧版插件。