what are the steps to follow for migrating a project from rails 3.2.13,ruby 1.9.1 to rails 4.2 or rails 4 other versions?

I have my project on rails3.2.13 and I am having around 80 gems in it,now I need to migrate my project to rails 4,what are the steps I need to follow for successfully upgrading without any gems conflicts and errors.

Answers


With so many gems in your codebase I suspect this is a large app and its not going to be a quick upgrade and unless you have been given a large amount of time to do this, your best bet is to break things down and do updates in stages on the old version and then upgrade when you feel the codebase is in a better state.

Before attempting the upgrade I would consider these points and make small changes / releases before any big upgrade project. The less code you have to actually change at the final upgrade stage the less risks you have.

  • Gems: The more gems you have, the more code that you have worry about and more more code you have to upgrade. Is your app using all these gems and if not can you remove the un-used ones. Are any of the gems really which are pretty basic and can you do the same functionality with just rails / ruby functionality and actually remove some gem altogether. The less gems you have, the less pain you will have when it comes to upgrading.
  • Tests: Whilst you are working on the code, write tests for any new code that you add or alter and write tests for any core parts of the code.
  • Latest 3.2 release: Get your coebase running on the latest 3.2 release, this will then include extra warnings of things which may not work that you can sort out sooner.
  • Deprecated: Are there any deprecated warnings in the logs, if so fix these before attempting any upgrade.
  • Old code: Is there any code that you know wont work on the later versions, can this be replaced with something that will work on both.

When you feel that the codebase is in a state where it can be upgraded, consider these points.

  • I would suggest not trying to do to much at the same time: Think about breaking out any ruby upgrade into a separate project from the rails upgrade.
  • Maybe consider moving up slowly, getting your app onto 4.0 or 4.1 and then re-evaluating things using the points above could prevent less risk to things breaking.
  • Regardless of how many automated tests you have, get a software tester to run over your app. they will find errors that your automated tests will have missed.

There are plenty of upgrade guides out there that you should take a read of before performing any upgrade.

Good luck.


Need Your Help

What is a good way to implement a menu system for an iphone game?

iphone objective-c xcode uiviewcontroller menu

I'm working on a project and I've been asked to add a fairly detailed and nested menu system overtop pre-existing gameplay. I'm new to iphone programming in general, but have experience with other C

Hibernate generate old query after column renaming

java hibernate jpa

I've renamed column in my database (from configuration_SYSTEM_ID to SYSTEM_ID), and added AttributeOverride annotation to my AbstractSubConfiguration class. But hibernate ignore this annotation and