2015-03-13 106 views
0

我想正确升级我的Rails应用程序从3.2.12到4.2 ...如何将Rails升级到4.2?

有人给我这个链接:http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html

此刻我试图从升级到3.2.12 4.0。 ...我挂在步骤5.4:

Rails 4.0 no longer supports loading plugins from vendor/plugins. 
You must replace any plugins by extracting them to gems and adding them to your Gemfile. 
If you choose not to make them gems, you can move them into, say, lib/my_plugin/* 
and add an appropriate initializer in config/initializers/my_plugin.rb. 

好了这就是没有问题,从供应商/插件LIB复制...但我怎么都成立了初始化? ...

+0

也许这个[**博客文章**](http://matt.coneybeare.me/how-to-convert-simple-rails-23-style-plugins/)可能会有所帮助。 – spickermann 2015-03-13 11:54:17

+0

遵循http://railsapps.github.io/updating-rails.html – 2015-03-13 12:35:43

+1

你将不得不弄清楚特定插件的情况,并编写一些代码 - 如果插件是内部的,或者否则不受支持。这不是纯粹的机械过程。除了spickermann推荐的博客文章外,我还写了一篇[这里](https://bibwild.wordpress.com/2012/04/25/converting-a-more-complex-rails-2 -3样式的插件 - 非弃用 - 导轨-3-2 /)。在升级到4.0,然后是4.1,然后是4.2,然后升级到3.2.21(最新的3.2.x)之前,您应该尝试使所有内容在零废弃警告运行。 – jrochkind 2015-03-13 13:32:51

回答

1

初始化程序是在启动时执行的普通ruby文件。他们住在config/initializers