Skip to content

Instantly share code, notes, and snippets.

@wesrog
Created October 29, 2009 03:50
Show Gist options
  • Save wesrog/221125 to your computer and use it in GitHub Desktop.
Save wesrog/221125 to your computer and use it in GitHub Desktop.
Get Rails versions of apps in a directory
Dir['*'].map { |d| `cat #{d}/config/environment.rb | grep RAILS_GEM_VERSION`.scan(/[\d\.]+/) }.flatten.uniq.sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment