Skip to content

Instantly share code, notes, and snippets.

@DanielKehoe
Created September 11, 2012 01:38
Show Gist options
  • Save DanielKehoe/3695312 to your computer and use it in GitHub Desktop.
Save DanielKehoe/3695312 to your computer and use it in GitHub Desktop.
check rvm gem version in app template
say_wizard "switching to gemset '#{app_name}'"
unless Gem.loaded_specs['rvm'].nil?
if Gem.loaded_specs['rvm'].version > Gem::Version.create('1.11.3.4')
raise "Please update rvm gem to 1.11.3.5 or newer"
end
end
begin
RVM.gemset_use! app_name
rescue StandardError => e
raise "rvm failure: unable to use gemset #{app_name}, reason: #{e}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment