Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Last active December 14, 2015 20:19
Show Gist options
  • Save FooBarWidget/5143316 to your computer and use it in GitHub Desktop.
Save FooBarWidget/5143316 to your computer and use it in GitHub Desktop.
# Returns the RVM installation mode:
# :single - RVM is installed in single-user mode.
# :multi - RVM is installed in multi-user mode.
# :mixed - RVM is in a mixed-mode installation.
# nil - The current Ruby interpreter is not using RVM.
def self.rvm_installation_mode
if in_rvm?
if ENV['rvm_path'] =~ /\.rvm/
return :single
else
if GEM_HOME =~ /\.rvm/
return :mixed
else
return :multi
end
end
else
return nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment