Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add /usr/local/opt/rubies to default search path. #76

Closed
wants to merge 5 commits into from

2 participants

@colinrymer

I've updated the code and README to /usr/local/opts/rubies instead of /usr/local/rubies.

@colinrymer colinrymer closed this
@colinrymer colinrymer reopened this
@postmodern
Owner

Doesn't homebrew use /usr/local/opt/? I know it installs package symlinks into /usr/local/.

@colinrymer

Homebrew does use /usr/local/opt/ (and various other directories in /usr/local/), which is the motivation for the addition of /usr/local/... to the search paths; it keeps the rubies out of Userland, without requiring them to be in /opt/.

@postmodern
Owner

I'm going to close this. Homebrew has claimed /usr/local/opt as there own, and users probably shouldn't be messing around in there. However, users can manually set RUBIES pointing to specific Ruby installations within /usr/local/opt/.

@postmodern postmodern closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +1 −1  README.md
  2. +1 −0  share/chruby/chruby.sh
View
2  README.md
@@ -74,7 +74,7 @@ Add the following to the `/etc/profile.d/chruby.sh`, `~/.bashrc` or
source /usr/local/share/chruby/chruby.sh
-By default chruby will search for Rubies installed into `/opt/rubies/` or
+By default chruby will search for Rubies installed into `/opt/rubies/`, `/usr/local/opt/rubies/`, or
`~/.rubies/`. For non-standard installation locations, simply set the
`RUBIES` variable:
View
1  share/chruby/chruby.sh
@@ -1,6 +1,7 @@
typeset -a RUBIES
[[ -d /opt/rubies/ ]] && RUBIES+=(/opt/rubies/*)
+[[ -d /usr/local/opt/rubies/ ]] && RUBIES+=(/usr/local/opt/rubies/*)
[[ -d "$HOME/.rubies" ]] && RUBIES+=("$HOME"/.rubies/*)
function chruby_reset()
Something went wrong with that request. Please try again.