升级到Rails 3.2.1后如何处理供应商/插件 [英] How to deal with vendor/plugins after upgrading to rails 3.2.1

查看:72
本文介绍了升级到Rails 3.2.1后如何处理供应商/插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到rails3.2.1后,会出现以下警告:

After upgrading to rails3.2.1,this warning occurs:

您在供应商/插件中有Rails 2.3样式的插件!这些插件的支持将在Rails 4.0中删除.将它们移出并将它们捆绑在您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中.有关更多信息,请参见发行说明:

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

我将插件移动到vendor/plugins目录中,但是我不知道如何编写config/initializers/myplugin.rb文件,而google找不到答案.

I move my plugins in vendor/plugins directory but i don't know how to write config/initializers/myplugin.rb file, and google can't find the answer.

推荐答案

我刚刚为此写了一篇博客文章:

I just wrote a blog post on this: How to Convert Simple Rails 2.3 Style Plugins for Rails 3.2

这篇关于升级到Rails 3.2.1后如何处理供应商/插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆