Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RVM use list[0]

Tags:

ruby

rvm

Is there something like "RVM use 1" or "RVM use list[0]" instead of typing the entire version number. At any time , we see a list of may be 5 or more rubies and we can easily type a single digit number instead of X.X.X. This will help rvm gemset too.

like image 497
Dhamodaran Avatar asked May 08 '13 18:05

Dhamodaran


2 Answers

You could do something like this:

rubies=(`rvm list strings`)
rvm use ${rubies[1]}

rvm list strings - list installed rubies, machine passable form.
This is put into a bash array.

like image 45
Shawn Balestracci Avatar answered Nov 04 '22 23:11

Shawn Balestracci


this will be possible in RVM 2.0 => https://docs.google.com/document/d/1xW9GeEpLOWPcddDg_hOPvK4oeLxJmU3Q5FiCNT7nTAc/edit?usp=sharing - anyone with the link can comment

like image 62
mpapis Avatar answered Nov 04 '22 22:11

mpapis