【问题标题】:Rails deprecation warning for vendor/plugins when I don't have any [duplicate]当我没有任何 [重复] 时,供应商/插件的 Rails 弃用警告
【发布时间】:2012-09-26 02:03:10
【问题描述】:

可能重复:
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 项目。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 heroku ruby-on-rails-3.2 rails-console


    【解决方案1】:

    Heroku 注入旧式插件以使您的应用程序在其服务器上运行(特别是将日志重定向到标准输出,并从 rails 提供静态资源)。检查git push 的输出...您会看到类似这样的内容

    -----> Rails plugin injection
           Injecting rails_log_stdout
           Injecting rails3_serve_static_assets
    

    所以这不是你做过的事情,也没有什么好担心的!这些在 Rails 3.x 上运行得很好,当 Rails 4 更成熟一点时,Heroku 无疑会解决一些问题。

    【讨论】:

      猜你喜欢
      • 2012-02-23
      • 2012-04-23
      • 2011-10-03
      • 1970-01-01
      • 1970-01-01
      • 2013-11-21
      • 2014-06-17
      • 1970-01-01
      • 2014-04-11
      相关资源
      最近更新 更多