Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cut down osx requirements

  • Loading branch information...
commit 7a90ae90d7ab283bc2ab80898829f287ed91a242 1 parent 6644137
@mpapis mpapis authored
Showing with 14 additions and 78 deletions.
  1. +14 −78 scripts/requirements
92 scripts/requirements
@@ -1,21 +1,19 @@
#!/usr/bin/env bash
( # wrap color reseting
-if ! typeset -f rvm_pretty_print >/dev/null 2>&1
-then source "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/logging"
-if ! typeset -f __rvm_detect_system >/dev/null 2>&1
-then source "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/utility"
-rvm_pretty_print stdout || unset rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr
+ if ! typeset -f rvm_pretty_print >/dev/null 2>&1
+ then source "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/logging"
+ fi
+ if ! typeset -f __rvm_detect_system >/dev/null 2>&1
+ then source "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/utility"
+ fi
+ rvm_pretty_print stdout || unset rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr
+ __rvm_detect_system
-if [[ "linux" == "$_system_type" || "bsd" == "$_system_type" || "solaris" == "$_system_type" ]]
- printf "%b" "Requirements for $_system_name/$_system_version/$_system_arch\n"
case ${1:-echo} in
+ printf "%b" "Requirements for $_system_name/$_system_version/$_system_arch\n"
printf "%b" "
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the *original* / standard Ruby Language Interpreter
@@ -25,36 +23,23 @@ NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
Additional Dependencies:
+ (run)
+ printf "%b" "Installing requirements for $_system_name/$_system_version/$_system_arch\n"
+ ;;
for _type in update-system rvm ruby jruby
printf "%b" "# For $_type:\n"
- bash "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/requirements/$_system_name" ${1:-echo} $_type
+ bash "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/requirements/$_system_name" ${1:-echo} force $_type
-elif [[ "$MACHTYPE" == *darwin* ]]
+else [[ "$MACHTYPE" == *darwin* ]]
- if ! typeset -f __rvm_detect_xcode_version > /dev/null 2>&1
- then source $rvm_path/scripts/functions/utility
- fi
- release="$( sw_vers -productName )"
- version="$( sw_vers -productVersion )"
xcode_version="$( __rvm_detect_xcode_version 2>&1 )"
: ${xcode_version:=0}
- printf "%b" "
- Notes for ${release} ${version}"
- if __rvm_version_compare "$xcode_version" -eq 0
- then
- printf "%b" ", No Xcode.
- else
- printf "%b" ", Xcode $xcode_version.
- fi
if __rvm_version_compare "$xcode_version" -ge 4.2
@@ -67,14 +52,6 @@ For JRuby: Install the JDK. See # Cu
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See
-To use an RVM installed Ruby as default, instead of the system ruby:
- rvm install 1.8.7 # installs patch 357: closest supported version
- rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
- rvm alias create default 1.8.7
-And reopen your terminal windows.
if __rvm_version_compare "$xcode_version" -gt 0 && __rvm_version_compare "$xcode_version" -lt 4.1
@@ -118,47 +95,6 @@ ${rvm_error_clr:-}Xcode 4.2${rvm_reset_clr:-} and later (including Command Line
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
- if (( UID == 0 )) || [[ "$rvm_path" == "/usr/local/rvm" ]]
- then
- printf "%b" "
-${rvm_notify_clr:-}RVM Group Membership Management${rvm_reset_clr:-} - 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:
- ${rvm_notify_clr:-}sudo dscl . -create /Groups/\$rvm_group_name gid \$gid${rvm_reset_clr:-}
-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:
- ${rvm_notify_clr:-}sudo dscl localhost -append /Local/Default/Groups/rvm GroupMembership \$user_name${rvm_notify_clr:-}
-To check on group membership to the RVM group, administrators would execute the following:
- ${rvm_notify_clr:-}rvmsudo dscl localhost -read /Local/Default/Groups/rvm${rvm_reset_clr:-}
-Pay attention to the GroupMembership and PrimaryGroupID lines. This tells you who is in it, and the GID for the RVM group.
-Afterwards, should administrators wish to remove users from the group, they would execute:
- ${rvm_notify_clr:-}sudo dscl localhost -delete /Local/Default/Groups/rvm GroupMembership \$user_name${rvm_reset_clr:-}
- ${rvm_notify_clr:-}sudo dsmemberutil flushcache${rvm_reset_clr:-}
-This will keep the 'rvm' group, but remove the listed user from it. They can directly delete the rvm group with:
- ${rvm_notify_clr:-}sudo dscl . -delete /Groups/rvm && sudo dsmemberutil flushcache${rvm_reset_clr:-}
-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'.
- fi
-printf "%b" "\n"
) # Finish color resetting block
Please sign in to comment.
Something went wrong with that request. Please try again.