Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find latest available RVM version number

Tags:

ruby

rvm

I can't seem to find an easy way to identify the latest release of RVM from command line or rvm.beginrescueend.com!?!

I currently type rvm get latest every few days or so to update RVM. If version is same, RVM goes through the download & update process regardless. I'd like to be able to first 'see' if there's an update to get.

Anyone know how? I'm sure I'm missing the obvious...

like image 781
Meltemi Avatar asked Jun 09 '11 00:06

Meltemi


People also ask

What is the command to update RVM in rails?

First of all, update your RVM installation by running rvm get stable . To make sure you're running the new RVM version, you'll then need to run rvm reload (or just open a new terminal). Once that's done, you can ask RVM to list the ruby versions available to install by running rvm list known .


1 Answers

you could use this one liner to check version:

$ curl -sS  https://api.github.com/repos/wayneeseguin/rvm/git/refs/tags | awk -F": |\"" '$2=="ref"{sub(/.*\//,"",$5); print $5}' | sort -V | tail -n 1
1.15.8

or a pure ruby one liner:

$ ruby -ropen-uri -rjson -e 'open("https://api.github.com/repos/wayneeseguin/rvm/git/refs/tags"){|r| puts JSON.parse(r.read).map{|l| l["ref"].gsub(/.*\//,"").split(".").map(&:to_i)}.sort.last.join(".") }'
1.15.8

but the simplest thing to do is:

$ curl https://raw.github.com/wayneeseguin/rvm/stable/VERSION
1.15.8
like image 192
mpapis Avatar answered Oct 07 '22 00:10

mpapis