4 Phases, 3 Months, 1 Goal: Solar Hub App’s Successful Rails 8.0 Upgrade

Find out how we overcame a massive Rails upgrade challenge and improved app's performance by 3X for a renewable energy provider.

Business Requirement:

Our client is a leading global energy and services group, operating in key sectors such as low-carbon electricity generation (with an emphasis on renewables), energy infrastructure, and customer solutions. As part of their commitment to innovation and sustainability, our client sought to modernize their Solar Hub Application, which is built on Ruby on Rails, to address critical security vulnerabilities, maintenance challenges, and performance bottlenecks.

Their Solar Hub Application plays a pivotal role in managing solar energy operations, enabling efficient credential operations, SMS notifications, payment processing, USSD interactions, and API integrations.

The client required a comprehensive upgrade of their application stack from Ruby 2.5 to Ruby 3.3 and Rails 5.x to Rails 8.0 to ensure long-term support, enhanced security, and improved performance. Additionally, they needed the upgrades to be executed without disrupting active development cycles or compromising the integrity of their codebase.

Our Involvement:

As a trusted Ruby on Rails expert, RailsFactory adopted a collaborative, phased approach to modernize the clients’ Solar Hub. We began with a comprehensive audit of the codebase, assessing compatibility across MEGA (Microservice for External Gateway Authentication), MESE (Microservice for Event Sourcing and Event Handling), MOMO (Microservice for Monitoring and Observability), and MOTO (Microservice for Transactions and Order Management).

Our team worked in tandem with the client’s developers, implementing incremental upgrades to minimize disruption. By aligning milestones with active development cycles, we ensured smooth integration of Rails 8.0 and Ruby 3.3 while preserving code integrity.

Challenges Faced:

Modernizing our client’s Solar Hub application posed several technical and operational hurdles. Addressing these challenges required meticulous planning and execution to ensure minimal disruption and maximum efficiency. The challenges are listed below:

  • Security Vulnerabilities: Outdated Ruby and Rails versions exposed the application to potential security threats like SQL injection, DoS, etc.
  • Maintenance Complexity: Active development cycles necessitated a phased upgrade approach to minimize disruptions.
  • Performance Bottlenecks: The existing stack was not optimized for modern performance standards, impacting user experience.
  • Interdependent Microservices: Upgrading Solar Hub required compatibility assessments for multiple interlinked microservices (MEGA, MESE, MOMO, MOTO).
  • Dependency Management: The application relied on numerous gems and libraries, requiring meticulous updates to avoid breaking functionality.
  • Deployment Constraints: The production environment used LXC containers, which were manual and outdated, creating version conflicts. A Proof of Concept (POC) container was developed to address this, adding an extra layer of testing.
  • Approval Dependencies: The deployment process relied on coordination with various country teams and departments, requiring individual testing and approvals, which were handled by their development team as part of their internal workflow.

Our Approach:

RailsFactory executed a structured, 4-phase Rails upgrade strategy to ensure stability and performance:

Our 4-step approach to upgrade to Rails 8

Step 1: Discovery and Planning

RailsFactory adopted an Agile methodology during the project discovery phase, focusing on:

  • Understanding the application's scale, complexity, and dependencies.
  • Creating a detailed roadmap for phased upgrades aligned with active development cycles.
  • Conducting compatibility assessments for Solar Hub and its dependent microservices.

Step 2: Incremental Upgrade Strategy

To ensure minimal disruption, we implemented an incremental upgrade strategy:

  • Ruby Upgrade: Incrementally upgraded from Ruby 2.5 to 3.3, ensuring backward compatibility at each stage.
  • Rails Upgrade: Progressed through intermediate versions in four phases: Rails 5 → 6.0 → 6.1 → 7.0 → 7.2 --> 8.0. Each phase addressed deprecations and resolved compatibility issues systematically.

Step 3: Microservice Alignment

Coordinated concurrent upgrades for MEGA, MESE, MOMO, and MOTO microservices to maintain seamless integration. Ensured compatibility and synchronization between interdependent services, minimizing disruptions during the transition. Notably, all the four microservices were upgraded from Ruby 3.2 to Rails 8.0 as a part of this effort.

This alignment guaranteed that all microservices functioned harmoniously, preserving the integrity of the Solar Hub Application ecosystem.

Step 4: Testing and Deployment

  • Staging Environment: Dockerized staging allowed us to test each phase incrementally, ensuring stability before moving to production.
  • Production Deployment: Due to the manual nature of the production environment (LXC containers), deployment was executed in two major phases. A Proof of Concept (POC) container was developed to bridge version conflicts, requiring additional testing.
  • QA Process: Two dedicated QA resources were assigned from RailsFactory. They conducted manual testing and automation testing using our Sedstart automation tool, covering 60% test cases.

Solution Offered:

RailsFactory leveraged its deep expertise in Ruby on Rails development to deliver a tailored solution:

  • Ruby and Rails Upgrades: Successfully upgraded Ruby from 2.5 to 3.3 and Rails from 5 to 8.0, ensuring compatibility and stability.
  • Dependency Management: Upgraded over 150+ gems and libraries while maintaining backward compatibility.
  • Enhanced Security: Implemented advanced security features available in the latest Rails version to protect user data and safeguard application integrity.
  • Performance Optimization: Refactored code and optimized models/controllers to leverage the latest Rails APIs, significantly improving performance.
  • Testing and Validation: Conducted extensive manual and automated testing (using Sedstart) to validate application integrity and robustness.

Value-Added Services:

At RailsFactory, we go beyond delivering core solutions by providing value-added services that enhance the overall quality and efficiency of the project. For this client, our value-added contributions included:

  • Automation Testing: To improve testing efficiency, we introduced Sedstart automation tool, achieving 60% test coverage. This not only streamlined the QA process but also reduced manual testing efforts significantly.
  • Proof of Concept (POC) Container Development: To address version conflicts in the outdated LXC-based production environment, their DevOps team created a POC container. This innovation ensured smoother transitions and added an extra layer of validation during testing.
  • Rigorous Code Reviews: At every phase of the upgrade, we conducted thorough code reviews. This proactive measure minimized last-minute surprises and ensured high-quality deliverables.
  • Collaborative Problem Solving: Our team took ownership of the deployment process, successfully managing the staging environment. The production deployment was handled by the client’s team as part of their internal workflow.

Tools and Technologies:

  • Languages & Frameworks: Ruby, Ruby on Rails

  • Testing Tools: Manual testing, Sedstart (Automation Testing Tool)

Benefits to the Client:

Benefits of Upgrading to Rails 8

  • Enhanced Security: The upgraded stack eliminated vulnerabilities, ensuring compliance with modern security standards.

  • Improved Performance: Application performance increased by 3x, with page load times reduced significantly.

  • Seamless Integration: Concurrent upgrades for dependent microservices ensured uninterrupted functionality across the ecosystem.

  • Future-Ready Codebase: The refactored codebase enables quicker and easier future upgrades, reducing technical debt.

  • Time Efficiency: Completed the Rails upgrade in just 3 months, far ahead of the 1-year timeline proposed by competitors.

  • Cost Savings: Enhanced platform availability and reduced maintenance efforts led to significant annual savings.

  • Value-Added Testing: Achieved 60% test coverage through Sedstart automation, enhancing QA efficiency and reliability.

About RailsFactory:

RailsFactory is a premier Ruby on Rails development partner specializing in energy-tech solutions. With 15+ years of expertise, we empower enterprises to achieve digital resilience through scalable, secure, and sustainable software. Our vertical-specific approach combines Agile methodologies, DevOps excellence, and deep industry insights to transform legacy systems into high-performing platforms.

Your one-stop shop for expert RoR services.

Join 250+ companies achieving top-notch RoR development without increasing your workforce.