Script to update RVM-based ruby install and gems -


Some pairs of searches have not triggered an obvious way to update my RVM-based ruby ​​and gems, so I The following script has been killed. Desire is to get a list of gems set up currently, update on new ruby, move those gems forward, then clear the old versions of everything. I am posting it for feedback, because I do not see an easy way to test it and I am quite capable of Ruby and do not give much information about RVM.

  #! /Usr / Bin / env ruby ​​module RubyUpdate def self.cmd (str, cmd) until $$ retrast =% x (# {cmd}) throws (SystemCallError, cmd)? == 0 Return Retal and Def self.update gem = self.cmd% Q (Getting list of established gems ...),% q (gem list | cut-d '' -f 1) self.cmd% q ruby ...),% cue (\\ curl -L https://get.rvm.io | bash -s static - rub) self.cmd% cue (reloading ...),% cue (rvm again Load) Self.cmd% Q (Gems Updating ..),% cue (Gem Update # {gems.gsub ("\ n", ""}}) self.cmd% cue (cleaning gems ... ),% Q (Mani Cleanup) self.cmd% Q (reloading ...),% Q (RVM reload) self.cmd% Q (Ruby clean ...),% Q (RVM) Inap all) start end end RubyUpdate :: "update successful!" Rescue SystemCallError = & gt; E puts "update fail!"   

You should use:

  get RVM constant RVM upgrade current ruby ​​   

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -