1)
I noticed that this system-wide install doesn't care for overiding the
default $rvm_path in /etc/rvmrc to some alternative path. Ie setting
up the rvmrc file prior to installation. Let's say we wanted to
install rvm into `/opt/rvm` instead of the usual places in /usr/local.
And we also want to override the rvm symlink path of /usr/local/bin to
some other path.
We must add these steps....
/etc/rvmrc:
rvm_path=/opt/rvm
rvm_symlink_path=/opt/bin
EOF
# Create these 2 directories before running the rvm install script
$ mkdir -p /opt/rvm
$ mkdir -p /opt/bin
# Then do what we normally do
$ gem install rvm
$ sudo rvm-install
The command output was:
rvm - shell scripts that allows a user to manage multiple ruby
versions in their own account.
Prepairing /opt/rvm ...
Installing rvm to /opt/rvm/ ...
Installing bin scripts to /opt/rvm/bin ...
Checking rc files (/etc/profile /etc/zshenv) ...
Adding 'if [[ -s /opt/rvm/scripts/rvm ]] ; then source
/opt/rvm/scripts/rvm ; fi' to /etc/profile.
Adding 'if [[ -s /Users/id/.profile ]] ; then source /Users/id ;
fi' to /etc/zshenv.
Adding 'if [[ -s /opt/rvm/scripts/rvm ]] ; then source
/opt/rvm/scripts/rvm ; fi' to /etc/zshenv.
Symlinking rvm to /opt/bin/rvm ...
Seems to be a successful installation. Perhaps the rvm install script
can include the missing steps.
2)
There may be a small bug somewhere. You probably didn't want to
reference $HOME in /etc/zshrc.
This bit:
Adding 'if [[ -s /Users/id/.profile ]] ; then source /Users/id ;
fi' to /etc/zshenv.
Should be:
Adding 'if [[ -s /opt/rvm/scripts/rvm ]] ; then source
/opt/rvm/scripts/rvm ; fi' to /etc/zshenv.
dreamcat4
drea...@gmail.com
Yes symlink_path != install path so that makes sense. Yes we can add more information to the installer and the mkdir commands.
>
>
> 2)
> There may be a small bug somewhere. You probably didn't want to
> reference $HOME in /etc/zshrc.
>
> This bit:
> Adding 'if [[ -s /Users/id/.profile ]] ; then source /Users/id ;
> fi' to /etc/zshenv.
>
> Should be:
> Adding 'if [[ -s /opt/rvm/scripts/rvm ]] ; then source
> /opt/rvm/scripts/rvm ; fi' to /etc/zshenv.
Thank you for pointing this out, I'll fix it tonight in git head.
~Wayne
On further inspection the .profile one *is* intended (fixes a bug some users have reported) however I have switched it as you suggest from zshrc to zshenv.
~Wayne