How should I upgrade a Rails app to use the latest version of Rails

后端 未结 7 618
鱼传尺愫
鱼传尺愫 2021-02-02 04:35

I\'m working on a Rails app that currently uses Rails 1.2, so I\'m now quite a long way behind the latest stable release (Rails 2.3).

How should I go about the process o

7条回答
  •  别跟我提以往
    2021-02-02 05:04

    My advice is to spend a week paying down any testing debt you've accumulated, and then do the upgrade all in one fell swoop.

    Where I work we upgraded a very large app from 1.2 to 2.0.2 last summer, and at the same time upgraded to Ruby 1.8.6.

    It took MUCH longer than expected. The app used a couple of old features that were removed or deprecated (like ActionWebService), so converting those took some time. But mostly we ran into a lot of subtle bugs, like slight differences in how radio button params work, some of which were attributable to the Ruby (vs. the Rails) upgrade.

    Some parts of the app had spotty test coverage. If we had gone into it with better tests it all would have been much easier.

提交回复
热议问题