On a recent Ruby on Rails application build we wanted to jump ahead to a pre-release version to get early access to the new Lexxy rich text editor.
We updated the Gemfile to require the beta version:
gem “rails”, “8.1.0.beta1”
and ran bundle update rails.
We had one dependency, bullet , that was incompatible. As this was a development tool and not used in the app we commented it out, ran the update again and everything went perfectly.
We ran rails app:update, followed the steps in the upgrade guide, and our app was running on the pre-release version.
A few weeks later, 8.1 was officially released. We immediately changed the Gemfile to require the final version:
gem “rails”, “~> 8.1.0”
and ran bundle update rails.
Boom – loads of dependency mismatch errors. So what went wrong?
Many major gems specify that they work only with the recently released version of Rails, or older, until the maintainers have tested compatibility with the latest release themselves. Often this is done in the gemspec file using:
s.add_dependency "rails", "< 8.1"
This seems reasonable, but how did it work when we installed the beta!?
The answer is that in gemspec land 8.1.0.beta1 < 8.1
Pre-release versions are explicitly considered less than their stable counterparts. This ensures that when dependencies are resolved, stable releases are always treated as more recent than pre-releases ,and you can’t install a pre-release unless you explicitly ask for it.
There’s no real way to work around this, unfortunately. You just have to wait for those gems to cut new releases that update the specification to < 8.2. In this case we were ready to roll within a couple of days.
It’s also worth remembering that if you do install a pre-release version of Rails, you might be able to successfully install other gems that don’t actually work with that version, because the dependency specification passes inadvertently.
As ever with beta software, it’s to be used at your own risk. In our case the application hadn’t gone live yet, so it was a risk we were willing to take to play with the new features. Just be aware that if you’ve successfully upgraded to a pre-release, that doesn’t mean you’ve solved all the problems!
With 8.1 now released it’s a good time to think about your Rails upgrade plan. Storm’s developers perform Rails upgrades all the time. We can help update your application if you don’t have the resources or time to do so. We can take the stress out of the process and make sure your app stays secure. Get in touch and let’s have a chat.

Efficient. Robust. Scalable. Secure.
Want to know more about Ruby on Rails?
Whether you’re a start-up or you’re looking for an agency to take on your existing Rails app, we’re here to help you.


