Skip to content

Instantly share code, notes, and snippets.

Created October 14, 2011 09:04
Show Gist options
  • Save anonymous/1286632 to your computer and use it in GitHub Desktop.
Save anonymous/1286632 to your computer and use it in GitHub Desktop.
Cloning into rvm...
RVM: Shell scripts enabling management of multiple ruby environments.
RTFM: https://rvm.beginrescueend.com/
HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
Installing RVM to /usr/local/rvm/
Correct permissions for base binaries in /usr/local/rvm/bin...
Copying manpages into place.
Creating RVM system user group 'rvm'
Recording config files for rubies.
root,
If you have any questions, issues and/or ideas for improvement please
fork the project and issue a pull request.
If you wish to disable the project .rvmrc file functionality, set
rvm_project_rvmrc=0 in either /etc/rvmrc or ~/.rvmrc.
NOTE: To Multi-User installers, please do NOT forget to add your users to the 'rvm'.
The installer no longer auto-adds root or users to the rvm group. Admins must do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership takes effect!
Thank you for using RVM!
I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
~Wayne
NOTE:
As of 1.8.0 RVM once again loads .rvmrc files, by default, after asking your
permission to trust it of course. If you do not wish to be enabled, simply set:
export rvm_project_rvmrc=0
Within either your /etc/rvmrc or $HOME/.rvmrc file. This will turn off the
cd/pushd hooks when sourcing the rvm() function into your shell.
Example: echo 'export rvm_project_rvmrc=0' >> $HOME/.rvmrc;
(Then close the current shell and open a new one.)
If you wish to add this for all users, exchange $HOME/.rvmrc with /etc/rvmrc
All individual additional OS requirements/dependencies are now contained in 'rvm requirements'
Installation of RVM to /usr/local/rvm/ is complete.
Notes for Darwin ( Mac OS X )
For Snow Leopard be sure to have Xcode Tools Version 3.2.1 (1613) or later
You should download the latest Xcode tools from developer.apple.com.
(This is since the dvd install for Snow Leopard contained bugs).
If you intend on installing MacRuby you must install LLVM first.
If you intend on installing JRuby you must install the JDK.
If you intend on installing IronRuby you must install Mono
(version 2.6 or greater is recommended).
To use an RVM installed Ruby as default instead of the system ruby:
rvm install 1.8.7 # installs patch 352: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system # migrate your gems
rvm --default 1.8.7
RVM Group Membership Management - With Multi-User installations, the RVM installer automatically
creates an 'rvm' group which, as the RVM documentation explains, administrators must add the users they wish
to let use the RVM installation to. The call is made in the installer as:
sudo dscl . -create /Groups/$rvm_group_name gid $gid
wherein RVM creates the gid by checking for the last assigned gid and adding 1. To physicially add a user to
the group, administrators must use:
sudo dscl localhost -append /Local/Default/Groups/rvm GroupMembership $user_name
Afterwards, should administrators wish to remove users from the group, they would execute:
sudo dscl localhost -delete /Local/Default/Groups/rvm GroupMembership $user_name
sudo dsmemberutil flushcache
This will keep the 'rvm' group, but remove the listed user from it. They can directly delete the rvm group with:
sudo dscl . -delete /Groups/rvm && sudo dsmemberutil flushcache
without previously deleting users from the group, as well. This will completely remove the 'rvm' group from the system.
Please note, the call to 'dsmemberutil flushcache' is required on both removal of the user from the group, and/or
removal of the group directly because that membership is still cached locally until either reboot or sync with
Directory Services. Allowing the group membership to stay in the user's 'groups' output does not mean the user is
automatically re-added to the 'rvm' group should the group be subsequently be re-added. This means the user(s) end up
erroneously showing they are part of the 'rvm' group even though they actually are not, if the call to 'dsmemberutil'
is not made. By this we mean the 'groups' command will still show them a part of the 'rvm' group, even if the user
logs out and then back in, due to caching. This applies to Tiger, Leopard, Snow Leopard, and Lion. Previous versions of
the OS such as Cheetah/Puma, and Jaguar used 'nicl', a.k.a NetInfo, and not 'dscl'.
Adding me to the RVM group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment