The “rv” Tool is Making Swift Progress, Becoming a Must-Have for Rubyists
Back in the mists of time, I used a tool called rvm. It was more than just a Ruby version manager, it was also a gemset manager: instead of using bundle exec or a binstub, you could just type a command and it would “work” because every version+gemset was a pristine environment. Cool in a way, but also very complicated.
I eventually migrated to the simpler rbenv and have used that for years now. It only manages Ruby versions and expects you to make use of Bundler to keep gems and executables in line. Y’know. Modern Ruby.
But what if you could use something even more modern than rbenv? Enter rv.
Inspired by uv in the Python ecosystem, rv aims to become your singular solution for total management of the Ruby environment. Right now this is primarily focused on installing Ruby versions, but in the future it will support installing gems and running executables. “Wait, would this then replace Bundler?” you might ask. That’s a distinct possibility, although my experience interfacing with Bundler as part of the Bridgetown framework leads me to believe Bundler isn’t going anywhere any time soon. (rv would need to offer a host of Ruby APIs to replace similar APIs provided by Bundler.)
One of the reasons rv is so fast is because it’s written in Rust. It seems to me the Rust is quickly becoming the new C when it comes to lower-level system languages operating alongside Ruby. A number of Rubyists are brushing up on their Rust and contributing to new tools like this, and I’m excited to see where that leads the ecosystem.
I’m using rv now in a couple of environments instead of rbenv, and it works quite well. Once the gem installation feature lands, you can be sure I’ll give that a thorough workout and report back. Bonus: many of the folks working on rv and other experimental tools like Ruby Butler are also involved in the gem.coop initiative I wrote about which is equally exciting.