Scripting With RVM
Because of how RVM works under the hood, you have to do a couple things to get it to work in a script.
First, you need to ensure that your script is using bash
instead of sh
, so add this to the top of your scripts:
You'll then want to make sure that RVM is sourced. Their docs recommend sourcing in a script like this:
After that, you can utilize any of the capabilities of RVM in your script as you'd like.
Last updated