Rails从2.3.11升级到4.0.0的最佳策略/实践是什么?

时间:2014-03-03 14:15:11

标签: ruby-on-rails ruby-on-rails-4 dependencies upgrade strategy-pattern

我想将我的一个应用程序从rails -2.3.11升级到4.0.0。       在做任何事情之前,我只需要计划它而我的应用程序不是那个       很大的尺寸,但有一些6/7插件和5/6宝石。

  Existed    : Ruby 1.8.7 + Rails 2.3.11
  Expected : Ruby 2.0.0 + Rails 4.0.0

   For this, I have plan as in two ways like below,
   1).Multi-step process : First need to upgrade app from rails 2.* to 3.* and then
      do upgrade from rails 3.* to 4.0.0
   2).Create new application from rails - 4.0.0 and rebuild old application all 
      features as we have already css, layouts...


   I hope both strategies will take same time.

 Any how, I need some inputs from you all. So please share your thoughts/comments.

     Thanks in advance.

2 个答案:

答案 0 :(得分:0)

首先,您可以逐步将Ruby升级到2.1.1。然后开始将你的Rails应用程序从2升级到3,最后升级到4.如果你有良好的测试覆盖率,你可以确保你没有破坏任何东西。重写也是一种选择。我建议你阅读这篇文章A Guide for Upgrading Ruby on Rails

答案 1 :(得分:0)