RVM 2.0

Convert 20,000 lines of shell script into Ruby.

Introduction

My name is Michal Papis and I'm the main contributor to RVM.

For the past two years, RVM has been sponsored by EngineYard, but this sponsorship came to an end on November 4th. This fundraiser will allow me to spend the next year working solely on the next major release of RVM and I need your help. Please show your support by pledging to this fundraiser and spreading the word.

Ruby Version Manager (RVM 1.x) has become well known for providing a consistent Ruby runtime environment that allows developers to build and deploy applications without worrying about Ruby versions and cross-platform dependencies. We want to use what we've learned over the past 5 years and create Ruby enVironment Manager (RVM 2.0). In addition to managing Ruby, RVM 2.0 autolibs will extend system package managers and install dependencies for databases, tools, libraries, and more.

Moving to Ruby and Rubygems

There are over 20,000 lines of shell script behind RVM 1.x and they are hard to maintain and improve. We want to rewrite RVM using Ruby and Rubygems so that we can benefit from the large community of Ruby developers. Moving to Ruby and Rubygems will:

reduce the amount of overall code

have better test coverage

leverage existing package management systems

enable Ruby developers to easily contribute

Modules

RVM will be split out into modules that cleanly separate functionality. This will make the code more manageable and easier to test. Differences between each operating system can be self-contained in modules. Core functionality can be extended and dependencies can be better managed.

Improved Testing

Shell scripts are hard to test. Moving to Ruby will allow us to write comprehensive test suites that ensure RVM works correctly on all platforms.

Estimated Schedule

This is how I would like to spend the next year:

4 months : Replicate most RVM 1 functionalities, provide installation for systems that already have binary rubies

: Replicate most RVM 1 functionalities, provide installation for systems that already have binary rubies 2 months : Work on binary/static rubies for more exotic systems to extend installation options

: Work on binary/static rubies for more exotic systems to extend installation options 2 months : Work on GUI (most likely JRuby, possibly a CLI version)

: Work on GUI (most likely JRuby, possibly a CLI version) 2 months : Work on building packages using RVM 2 (so it deprecates itself)

: Work on building packages using RVM 2 (so it deprecates itself) 2 months : Build infrastructure for automated binary/package builds

: Build infrastructure for automated binary/package builds 2 months : Integrate with Rubygems (and other languages' library managers) to support installation of c-extensions where system dependencies are needed

: Integrate with Rubygems (and other languages' library managers) to support installation of c-extensions where system dependencies are needed 2 months: Work on building installation packages like RailsInstaller

RVM vs. rbenv vs. chruby

Tools like rbenv or chruby can work well in simple scenarios, especially if you’re very skilled with the Unix shell. However, as environments and dependencies grow in complexity, these tools quickly become inadequate. RVM seems more “complicated” because it does a lot more to make handling these scenarios easy.

To paraphrase Jonathan Jackson, RVM is to Rails as rbenv is to Sinatra. Sinatra is a lightweight framework whereas Rails is much more robust. Sometimes Sinatra just fits, and other times you'd be a fool to not go with Rails.

More Information

If you want more information, please read through our Google Doc and watch this 40 minute video:

Stretch Goals

$60,000: Configuration Tools

Configuration Tools $70,000: Environment Sets

Environment Sets $90,000: Building installers of complete software sets like Rails

Building installers of complete software sets like Rails $110,000: Cross compilation

Thanks to Our Awesome Team

To start, I want to give the biggest thanks of all to RVM's initial author, Wayne E. Seguin (@wayneeseguin)! None of this would be possible without him starting the project.

Additionally, I have been working with this awesome team of contributors, and hope to continue to do so to bring RVM 2.0 to fruition:

...and many more!