“If it is done with ssh on the server, it goes here. If it is done with an account logged into a website, it goes into one of the other manuals.”
1.1. Setting up chruby for a new website
Summary. You have nothing to do to enable
chruby for a new website, and only have to create a suitable
.ruby-version file to activate one of the installed Rubies that
chruby manages. Remember to do this before installing bundler and the gems bundle, to avoid an accidental global installation. For a walkthrough process, see this example.
chruby is installed system wide by means of the following content in
/etc/profile.d/chruby.sh. The inclusion of
auto.sh means we also enabled Ruby version auto-switching.
if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then source /usr/local/share/chruby/chruby.sh source /usr/local/share/chruby/auto.sh fi
You can find out the current Ruby version by executing
chruby. This will list all installed versions and mark the chosen version with an asterisk.
chruby encounters a file
.ruby-version in the current directory, then this will tell which is the currently chosen version.