01Project Overview
Pennine Freight Services Ltd is a Leeds-based freight forwarder and haulier that moves goods for manufacturers and retailers across the UK and between the UK and continental Europe. Around 400 business customers use its online portal every day to book collections, track consignments, download proof of delivery and customs documents, and view invoices.
The portal was built on Ruby on Rails in 2014 and had barely been touched since. It ran on a Rails version that no longer received security updates, depended on libraries that had been abandoned, and had almost no automated tests. Developers who had worked on it had moved on, and the in-house IT team was reluctant to change anything for fear of breaking it. Meanwhile, a list of features that customers had requested for years sat untouched.
Pennine asked Accugile to bring the portal up to date without disrupting customers. We audited the code and infrastructure, built a safety net of automated tests, and upgraded the framework in stages, one major version at a time. Along the way we cleaned up the database, rebuilt the slowest pages, and delivered the features Pennine had been postponing.
The upgrade was completed with no unplanned outages. Pages that used to take five seconds now load in under two, the portal is back on supported, secure versions, and Pennine’s team has a clear upgrade guide for the future.
02Business Need
The portal was central to Pennine’s customer relationships, which made its condition a growing business risk rather than just a technical concern.
A complete rewrite was considered and rejected: it would take too long, carry its own risks, and freeze improvements for a year or more. Pennine wanted a path that reduced risk with every step.
03The Vision
Pennine’s Head of Digital set out a simple goal for the programme: a portal the team could be proud of and confident to change.
04Our Approach
Modernising a legacy application is less about writing new code and more about managing risk. We followed a sequence that made each step safer than the last.
05The Solution
Framework and Platform Upgrade
- Rails 3.2 to 7.1 and Ruby 2.1 to 3.3, completed in five production releases.
- Abandoned gems replaced with maintained alternatives or small pieces of in-house code.
- Old asset pipeline replaced with modern JavaScript bundling and Hotwire for responsive pages without a heavy frontend framework.
- Background processing moved from cron scripts to Sidekiq queues with retries and monitoring.
Database Clean-up
- PostgreSQL upgraded from version 9.4 to 16.
- Missing indexes added and the slowest queries rewritten, removing repeated database calls on list pages.
- Ten years of orphaned records, duplicate addresses and unused tables cleaned up after review with Pennine’s team.
- Large historical tables archived, keeping everyday queries fast.
Features Delivered
06How We Worked
Pennine’s IT team was small, so we worked in a way that built their confidence alongside the code.
- Fortnightly reviews with Pennine’s Head of Digital and IT manager, showing progress on both upgrades and features.
- A visible risk register, updated at each stage and shared openly.
- Release notes for customer service staff before every production release, so they knew what to expect.
- A small group of customers invited to try new features early and give feedback.
- Pairing sessions with Pennine’s IT team so they understood each change and could support it.
07Approach and Phases
Code, gem and infrastructure audit, security review, performance profiling and a staged upgrade plan.
Characterisation tests, CI pipeline, staging environment, containerised deployment and monitoring.
Rails 4.2, 5.2 and 6.1 released one after another, with database and query fixes along the way.
Rails 7.1, Ruby 3.3 and PostgreSQL 16, plus Hotwire for the busiest pages.
Bulk booking, multi-user accounts, saved addresses, document centre, tracking alerts and single sign-on.
Upgrade guide, architecture notes, runbooks and training for Pennine’s IT team.
08Technology and Architecture
We kept the portal as a single Rails application. For a team of Pennine’s size, a well-structured monolith on current versions is far easier to run and change than a set of new services, and it avoided the risk of a rewrite.
Performance gains came from three places: database work that removed slow and repeated queries, caching of reference data such as depots and service types, and Hotwire, which updates only the parts of a page that change instead of reloading it.
09Integrations
- Pennine’s transport management system for bookings, consignment updates and proof of delivery.
- Sage accounting for invoices and account balances.
- Carrier tracking APIs for European partners, and customs status updates for import and export shipments.
- Microsoft Entra ID for customer single sign-on.
- Postmark for reliable transactional email.
10Security and Compliance
- All known framework and library vulnerabilities resolved by moving to supported versions.
- Role-based access within customer accounts, and audit logs for bookings and document downloads.
- Single sign-on and two-factor authentication for customer administrators.
- Data hosted in the UK, with handling aligned with UK GDPR.
- Automated dependency scanning so future vulnerabilities are spotted and patched quickly.
11Quality Assurance
- Test coverage raised from 6% to 78%, with every critical journey covered by system tests.
- Comparison testing of old and new versions using copies of production data before each upgrade release.
- Load testing that recreates month-end usage, when customers download large numbers of invoices.
- Feature flags and quick rollback for every release.
12Challenges We Overcame
Every legacy system holds surprises, and this one was no exception.
13How the Modernised Portal Creates a Cycle of Value
14Results
By the end of the eight-month programme, the portal had been transformed without customers experiencing a single unplanned outage.
Performance
| Page | Before | After |
|---|---|---|
| Consignment search | 5.4 s | 1.3 s |
| Invoice list | 6.1 s | 1.6 s |
| Booking form | 3.8 s | 0.9 s |
| Month-end timeouts | Frequent | None recorded |
Customers and Operations
Engineering Health
15Results Across Customer Groups
Different customers benefit in different ways from the modernised portal.
Our customer portal was a decade-old Rails app that nobody wanted to touch. Accugile upgraded the framework in stages, cleaned up the database, and added the features we had been postponing for years. Nothing broke along the way, and pages that took five seconds now load in under two. They also left us a clear upgrade guide.
16Why the Partnership Worked
Pennine’s team chose a careful, staged approach over a dramatic rewrite, and the partnership was built around that shared caution.
17The Partnership Continues
With the foundations repaired, Pennine is planning the next round of improvements:
- Instant quotes for standard pallet and parcel services.
- A customer API for retailers who want to book directly from their own systems.
- Carbon emissions reporting per consignment.
- A light mobile view for drivers at customer sites.



