This case study narrates how Andolasoft helped Leaguer to migrate their entire web application from Rails v2 to Rails v3. As the application was developed on an older version of Ruby, the code was very likely to be hard to maintain. Leaguer approached Andolasoft to deliver a Rails v2 to Rails v3 upgrade.
Leaguer is a free, easy to use league management software that manages all aspects of a team, club or league. It makes content update easy, manages online registrations and broadcasts game changes too. It also integrates with leading social media platforms, which means one can post announcements on a website, facebook page and twitter feeds, as well as send email & text messages with a single click.
Initially the Leaguer app was developed using Rails v2 and Ruby v1.8.7. As the versions were outdated, the app was losing community support; Resulting in prevention to integrate new features. Not to mention, there were major performance issues & security flaws as well.
When Leaguer came up with these issues, we got rolling with our ground work in order to find the root cause. We realized that instead of adding the patches it would be a better idea to migrate the application to Rails v3 first, rather than migrating directly from v2 to v4.
As the web application was a SaaS based product, it had lots of complex functionalities. Then there was also the usage of several customized components in the backend.
As Rails v2 uses ‘prototype.js’, we had a very hard time making it compatible within Rails v3 environment (which uses jquery.js). Hence, we migrated the application in such a way that some of the old components were reused in rails v3 application, saving a lot of time and money of course. Things like fixing the Active Record syntax, gems and plugin dependencies, routes were then dealt with.
The most complex part was the Site Builder section, which had ‘prototype.js’ and where a user could create/edit pages on fly, drag & drop pictures, videos or slideshows directly onto the website from Picasa, Flickr, YouTube & Smugmug. Once the prototype was compatible within Rails v3 environment, all that’s needed was some minor fixes.
Another major issue we faced just before moving the production, was that of storing the session on both top level domain (e.g. www.example.com) and the leaguer subdomain. A few productive hours, all issues were fixed and it was time to push it live. Post-live glitches were addressed within a day or two.
The Migration was tricky but our approach of outlining a plan and on-time completion worked wonders. When we started off, we decided to break the complexities of migration into small parts and take baby steps towards the upgrade. As a result, we successfully migrated the app to Rails v3 & deployed it into production last year.
We’ve made numerous add-ons to the application since then & are constantly working on making it even better.