Monday, January 25, 2010

Remotely Determining Ruby, RubyGems, and Gem Versions via ssh

The following one liner displays the ruby executable's version, RUBY_VERSION, the RubyGems version, and lists all gems:
ssh userid@server 'ruby -v && echo RUBY_VERSION: && ruby -e "p RUBY_VERSION" && echo RubyGems version: && gem -v && echo Installed gems: && gem list'

No comments: