You can run rbenv init - for yourself to inspect the generated script. This bit is also optional, but allows rbenv and plugins to change variables in your current shell, making commands like rbenv shell possible. If this step slows down your shell startup, you can invoke rbenv init - with the -no-rehash flag. Installs shell completion for rbenv commands. This is basically the only requirement for rbenv to function properly. Prepends ~/.rbenv/shims directory to PATH. Here is what the command does when its output is eval'd:Īdds rbenv executable to PATH if necessary. This helper is part of the recommended installation instructions, but optional, as an advanced user can set up the following tasks manually. Rbenv init is a helper command to bootstrap rbenv into a shell. You can affect how rbenv operates with the following settings: nameĭefines the directory under which Ruby versions and shims reside.Ĭolon-separated list of paths searched for rbenv hooks.ĭirectory to start searching for. On macOS or Linux, we recommend installing rbenv with Homebrew. Install rbenv using one of the following approaches. On other systems, “Basic Git Checkout” might be the easiest way of ensuring that you are always installing the latest version of rbenv. On systems with Homebrew package manager, the “Using Package Managers” method is recommended. See the comparison of version managers for more details and some alternatives. The simplicity of rbenv has its benefits, but also some downsides. A different project of yours that is another directory might be using a different version of Ruby altogether-rbenv will seamlessly transition from one Ruby version to another when you switch projects.įinally, almost every aspect of rbenv's mechanism is customizable via plugins written in bash. ruby-version file in the current directory with the version that you've chosen.
0 Comments
Leave a Reply. |