Skip to content

Instantly share code, notes, and snippets.

@tommi-lew
Created December 23, 2013 08:34
Show Gist options
  • Save tommi-lew/8093509 to your computer and use it in GitHub Desktop.
Save tommi-lew/8093509 to your computer and use it in GitHub Desktop.
Get Heroku apps and output their ruby versions.
#!/usr/bin/env rvm-auto-ruby
heroku_apps = `heroku apps`
heroku_apps = heroku_apps.split("\n")
heroku_apps.shift
heroku_apps.map! {|item| item.split(" ")[0] }
heroku_apps.each do |app|
ruby_version = `heroku run "ruby -v" -a #{app}`
p "#{app}: #{ruby_version.split("\n")[1]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment