这个问题在这里已经有了答案:
9年前关闭。
Possible Duplicate:
eliminating Rails 2.3-style plugins and deprecation warnings
执行
heroku run console
时出现以下错误:$ heroku run console
Running `console` attached to terminal... up, run.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 an d 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)
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 an d 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)
Connecting to database specified by DATABASE_URL
Loading production environment (Rails 3.2.8)
irb(main):001:0>
但是,我在供应商/插件中的唯一文件是
.gitkeep
:$ ls -lha vendor/plugins/
total 0
drwxr-xr-x 1 Scott Administ 0 Sep 7 12:26 .
drwxr-xr-x 1 Scott Administ 0 Sep 7 12:26 ..
-rw-r--r-- 1 Scott Administ 0 Sep 7 12:26 .gitkeep
我什至尝试删除
.gitkeep
文件,我仍然收到相同的弃用警告。我有坏插件吗?这是一个相对较新的 Rails 项目。
最佳答案
Heroku 注入(inject)旧式插件以使您的应用程序在其服务器上运行(特别是将日志重定向到标准输出,并从 rails 提供静态 Assets )。检查 git push
的输出...你会看到这样的东西
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
所以这不是你做过的事情,也没有什么好担心的!这些在 Rails 3.x 上工作得很好,当 Rails 4 更成熟一点时,Heroku 无疑会解决一些问题。
关于ruby-on-rails - 当我没有任何供应商/插件时,Rails 弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12737369/