
DIY Ruby on Rails Upgrades: Essential Open Source Tools
At FastRuby.io , we deeply value the Ruby and Rails communities and believe in giving back through open source contributions. We wouldn’t be where we are today if it wasn’t thanks to a lot of open source projects we use on a daily basis.
We actively use, maintain, and enhance several tools designed to empower developers and teams who want to handle Ruby and Rails upgrades themselves, especially those who might not have the budget to hire our services.
These open source projects facilitate upgrades by improving transparency, managing technical debt, and ensuring smooth transitions between Ruby and Rails versions.
Here’s an overview of each tool and how it can support your next upgrade project.
NextRails: Manage Deprecations & Dual Booting
NextRails is designed to simplify dual booting your Rails application with two different Ruby or Rails versions simultaneously.
It’s particularly helpful for tracking deprecation warnings across your test suite, making the transition to newer versions seamless and safer.
RubyCritic: Quickly Assess Your Codebase
RubyCritic helps you get an insightful overview of any Rails application, especially when landing on unfamiliar territory.
While we did not create this project, our team regularly contributes to RubyCritic, notably adding a code coverage section to clearly illustrate the state of testing across your application.
Skunk: Identify Technical Debt Hotspots
Skunk combines metrics such as churn (how often files change), complexity, and code coverage to highlight potential risks or blockers during upgrades.
High churn, high complexity, and low code coverage areas usually indicate parts of your codebase that will need thorough manual QA.
Skunk.fyi: Easily Share Your Skunk Reports
Skunk.fyi makes sharing Skunk reports straightforward and effective.
SHARE=true bundle exec skunk app lib config
If you run Skunk with the SHARE environment variable set to true, it will upload your report to skunk.fastruby.io for easy collaboration with teammates, clients, or other stakeholders.
Here you can see an example: Skunk Report Sample
RailsBump.org: Gem Compatibility Checker
RailsBump powers RailsBump.org , a quick way to
check your Gemfile.lock
compatibility with Rails versions from 2.3 up to 8.0.
It also verifies whether gems are compatible with the Rails version you’re targeting, streamlining the planning phase of your upgrade.
RailsBump uses GitHub Actions (checker ) to automate the compatibility checks, providing rapid insights.
FastRuby.io Audit: Bundler Audit Check
FastRuby.io Audit is behind audit.fastruby.io , a fast and accessible tool to run bundle-audit
on your Rails project’s dependencies.
Using this tool you can easily discover and share vulnerabilities in your Gemfile.lock to ensure security issues are caught early.
Rails Stats: Better Application Metrics
Rails Stats enhances Rails’ native rake stats
task by integrating
bundle-stats
and offering a more comprehensive breakdown of your Rails directories.
It’s ideal for gauging the size and complexity of your application quickly.
Custom Heroku Buildpack: Multiple Gemfiles
When deploying multiple Gemfiles to Heroku, our custom buildpack simplifies dual booting on staging, production, or Heroku review apps, significantly easing the deployment process during upgrades.
Our Recommended DIY Upgrade Workflow
Here’s how you can use our tools for a Ruby or Rails upgrade project:
- Size & Complexity Analysis: Run
rails_stats
to quickly assess application complexity. - Technical Debt Assessment: Use RubyCritic and Skunk to pinpoint problematic code areas.
- Security Check: Verify dependencies security via audit.fastruby.io.
- Analyze Compatibility: Use RailsBump.org to check your Gemfile.lock against targeted Rails versions.
- Address Deprecation Warnings: Use NextRails to identify and address deprecation warnings.
- Dual Boot Setup: Implement dual booting with NextRails to easily switch between different versions of Rails.
- Continuous Integration (CI): Configure CI to test both current and target Rails versions.
- Staging & QA: Deploy your upgraded Rails version to staging with the Heroku buildpack for rigorous QA. Leverage Skunk reports to estimate required QA effort.
Contributing to These Tools
We enthusiastically welcome issues, feature requests, and pull requests across all our open source projects. Your contributions help us enhance these tools further, benefiting the wider Ruby community.
If you try these tools and run into time constraints or challenges, we’d love to help. Reach out to discuss additional open source improvements or our professional Rails upgrade services.
Upgrade Guides
All these tools, combined with these upgrade guides, are a great combination to take a stab at upgrading any Ruby or Rails application:
-
The Official Rails Upgrade Guides : This guide is highly recommended for simple Ruby on Rails applications.
-
The FastRuby.io Upgrade Series : This guide is highly recommended for complex Ruby on Rails applications. In this page, you can also download our free eBook: The Complete Guide to Upgrade Rails.
Happy upgrading! 🚀
Who we are:
FastRuby.io specializes in Ruby on Rails application upgrades and maintenance. With a focus on reducing technical debt, our dedicated team helps startups to Fortune 500 companies optimize their applications for performance, security, and maintainability.
To learn more about our services: