简体   繁体   中英

Upgrading Rails 3.2 to Rails 5

I have a Rails 3.2 project that has 30 models and about 20 controllers. It's not a super huge codebase and its pretty much an idiomatic Rails site.

Is there any advantage to just doing rails new and controller by controller, model by model, gem by gem just copy and pasting things in and getting everything running on a fresh Rails 5 instance?

I just see some pain trying to do an upgrade version by version. Is this a viable way to upgrade a project where I have written all the code and know the project well?

There's no harm in doing that at all, it will help you move to the newer project structure and ensure all new files are in place (bin files for instance). You will still need to make sure you make all of the relevant code changes ( ApplicationRecord inheritance for example) to your files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM