Rbenv - Manage your app's Ruby environment

Overview

Seamlessly manage your app’s Ruby environment with rbenv.

Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production. Put rbenv to work with Bundler for painless Ruby upgrades and bulletproof deployments.

Powerful in development. Specify your app's Ruby version once, in a single file. Keep all your teammates on the same page. No headaches running apps on different versions of Ruby. Just Works™ from the command line and with app servers like Pow. Override the Ruby version anytime: just set an environment variable.

Rock-solid in production. Your application's executables are its interface with ops. With rbenv and Bundler binstubs you'll never again need to cd in a cron job or Chef recipe to ensure you've selected the right runtime. The Ruby version dependency lives in one place—your app—so upgrades and rollbacks are atomic, even when you switch versions.

One thing well. rbenv is concerned solely with switching Ruby versions. It's simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Compile your own Ruby versions, or use the ruby-build plugin to automate the process. Specify per-application environment variables with rbenv-vars. See more plugins on the wiki.

Why choose rbenv over RVM?

How It Works

At a high level, rbenv intercepts Ruby commands using shim executables injected into your PATH, determines which Ruby version has been specified by your application, and passes your commands along to the correct Ruby installation.

Understanding PATH

When you run a command like ruby or rake, your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called PATH, with each directory in the list separated by a colon:

/usr/local/bin:/usr/bin:/bin

Directories in PATH are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. In this example, the /usr/local/bin directory will be searched first, then /usr/bin, then /bin.

Understanding Shims

rbenv works by inserting a directory of shims at the front of your PATH:

~/.rbenv/shims:/usr/local/bin:/usr/bin:/bin

Through a process called rehashing, rbenv maintains shims in that directory to match every Ruby command across every installed version of Ruby—irb, gem, rake, rails, ruby, and so on.

Shims are lightweight executables that simply pass your command along to rbenv. So with rbenv installed, when you run, say, rake, your operating system will do the following:

  • Search your PATH for an executable file named rake
  • Find the rbenv shim named rake at the beginning of your PATH
  • Run the shim named rake, which in turn passes the command along to rbenv

Choosing the Ruby Version

When you execute a shim, rbenv determines which Ruby version to use by reading it from the following sources, in this order:

  1. The RBENV_VERSION environment variable, if specified. You can use the rbenv shell command to set this environment variable in your current shell session.

  2. The first .ruby-version file found by searching the directory of the script you are executing and each of its parent directories until reaching the root of your filesystem.

  3. The first .ruby-version file found by searching the current working directory and each of its parent directories until reaching the root of your filesystem. You can modify the .ruby-version file in the current working directory with the rbenv local command.

  4. The global ~/.rbenv/version file. You can modify this file using the rbenv global command. If the global version file is not present, rbenv assumes you want to use the "system" Ruby—i.e. whatever version would be run if rbenv weren't in your path.

Locating the Ruby Installation

Once rbenv has determined which version of Ruby your application has specified, it passes the command along to the corresponding Ruby installation.

Each Ruby version is installed into its own directory under ~/.rbenv/versions. For example, you might have these versions installed:

  • ~/.rbenv/versions/1.8.7-p371/
  • ~/.rbenv/versions/1.9.3-p327/
  • ~/.rbenv/versions/jruby-1.7.1/

Version names to rbenv are simply the names of the directories in ~/.rbenv/versions.

Installation

Compatibility note: rbenv is incompatible with RVM. Please make sure to fully uninstall RVM and remove any references to it from your shell initialization files before installing rbenv.

Using Package Managers

  1. Install rbenv.
  • macOS If you're on macOS, we recommend installing rbenv with Homebrew.

    brew install rbenv

    Note that this also installs ruby-build, so you'll be ready to install other Ruby versions out of the box.

    • Upgrading with Homebrew

      To upgrade to the latest rbenv and update ruby-build with newly released Ruby versions, upgrade the Homebrew packages:

      brew upgrade rbenv ruby-build
  • Debian, Ubuntu and their derivatives

    sudo apt install rbenv
  • Arch Linux and it's derivatives

    Archlinux has an AUR Package for rbenv and you can install it from the AUR using the instructions from this wiki page.

  1. Set up rbenv in your shell.

    rbenv init

    Follow the printed instructions to set up rbenv shell integration.

  2. Close your Terminal window and open a new one so your changes take effect.

  3. Verify that rbenv is properly set up using this rbenv-doctor script:

    curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
    Checking for `rbenv' in PATH: /usr/local/bin/rbenv
    Checking for rbenv shims in PATH: OK
    Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20170523)
    Counting installed Ruby versions: none
      There aren't any Ruby versions installed under `~/.rbenv/versions'.
      You can install Ruby versions like so: rbenv install 2.2.4
    Checking RubyGems settings: OK
    Auditing installed plugins: OK
  4. That's it! Installing rbenv includes ruby-build, so now you're ready to install some other Ruby versions using rbenv install.

Basic GitHub Checkout

For a more automated install, you can use rbenv-installer. If you prefer a manual approach, follow the steps below.

This will get you going with the latest version of rbenv without needing a systemwide install.

  1. Clone rbenv into ~/.rbenv.

    git clone https://github.com/rbenv/rbenv.git ~/.rbenv

    Optionally, try to compile dynamic bash extension to speed up rbenv. Don't worry if it fails; rbenv will still work normally:

    cd ~/.rbenv && src/configure && make -C src
  2. Add ~/.rbenv/bin to your $PATH for access to the rbenv command-line utility.

    • For bash:

      Ubuntu Desktop users should configure ~/.bashrc:

      echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

      On other platforms, bash is usually configured via ~/.bash_profile:

      echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    • For Zsh:

      echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
    • For Fish shell:

      set -Ux fish_user_paths $HOME/.rbenv/bin $fish_user_paths
  3. Set up rbenv in your shell.

    ~/.rbenv/bin/rbenv init

    Follow the printed instructions to set up rbenv shell integration.

  4. Restart your shell so that PATH changes take effect. (Opening a new terminal tab will usually do it.)

  5. Verify that rbenv is properly set up using this rbenv-doctor script:

    curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
    Checking for `rbenv' in PATH: /usr/local/bin/rbenv
    Checking for rbenv shims in PATH: OK
    Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20170523)
    Counting installed Ruby versions: none
      There aren't any Ruby versions installed under `~/.rbenv/versions'.
      You can install Ruby versions like so: rbenv install 2.2.4
    Checking RubyGems settings: OK
    Auditing installed plugins: OK
  6. (Optional) Install ruby-build, which provides the rbenv install command that simplifies the process of installing new Ruby versions.

Upgrading with Git

If you've installed rbenv manually using Git, you can upgrade to the latest version by pulling from GitHub:

cd ~/.rbenv
git pull

Updating the list of available Ruby versions

If you're using the rbenv install command, then the list of available Ruby versions is not automatically updated when pulling from the rbenv repo. To do this manually:

cd ~/.rbenv/plugins/ruby-build
git pull

How rbenv hooks into your shell

Skip this section unless you must know what every line in your shell profile is doing.

rbenv init is the only command that crosses the line of loading extra commands into your shell. Coming from RVM, some of you might be opposed to this idea. Here's what rbenv init actually does:

  1. Sets up your shims path. This is the only requirement for rbenv to function properly. You can do this by hand by prepending ~/.rbenv/shims to your $PATH.

  2. Installs autocompletion. This is entirely optional but pretty useful. Sourcing ~/.rbenv/completions/rbenv.bash will set that up. There is also a ~/.rbenv/completions/rbenv.zsh for Zsh users.

  3. Rehashes shims. From time to time you'll need to rebuild your shim files. Doing this automatically makes sure everything is up to date. You can always run rbenv rehash manually.

  4. Installs the sh dispatcher. This bit is also optional, but allows rbenv and plugins to change variables in your current shell, making commands like rbenv shell possible. The sh dispatcher doesn't do anything invasive like override cd or hack your shell prompt, but if for some reason you need rbenv to be a real script rather than a shell function, you can safely skip it.

Run rbenv init - for yourself to see exactly what happens under the hood.

Installing Ruby versions

The rbenv install command doesn't ship with rbenv out of the box, but is provided by the ruby-build project. If you installed it either as part of GitHub checkout process outlined above or via Homebrew, you should be able to:

# list latest stable versions:
rbenv install -l

# list all local versions:
rbenv install -L

# install a Ruby version:
rbenv install 2.0.0-p247

Set a Ruby version to finish installation and start using commands rbenv global 2.0.0-p247 or rbenv local 2.0.0-p247

Alternatively to the install command, you can download and compile Ruby manually as a subdirectory of ~/.rbenv/versions/. An entry in that directory can also be a symlink to a Ruby version installed elsewhere on the filesystem. rbenv doesn't care; it will simply treat any entry in the versions/ directory as a separate Ruby version.

Installing Ruby gems

Once you've installed some Ruby versions, you'll want to install gems. First, ensure that the target version for your project is the one you want by checking rbenv version (see Command Reference). Select another version using rbenv local 2.0.0-p247, for example. Then, proceed to install gems as you normally would:

gem install bundler

You don't need sudo to install gems. Typically, the Ruby versions will be installed and writeable by your user. No extra privileges are required to install gems.

Check the location where gems are being installed with gem env:

gem env home
# => ~/.rbenv/versions/<ruby-version>/lib/ruby/gems/...

Uninstalling Ruby versions

As time goes on, Ruby versions you install will accumulate in your ~/.rbenv/versions directory.

To remove old Ruby versions, simply rm -rf the directory of the version you want to remove. You can find the directory of a particular Ruby version with the rbenv prefix command, e.g. rbenv prefix 1.8.7-p357.

The ruby-build plugin provides an rbenv uninstall command to automate the removal process.

Uninstalling rbenv

The simplicity of rbenv makes it easy to temporarily disable it, or uninstall from the system.

  1. To disable rbenv managing your Ruby versions, simply remove the rbenv init line from your shell startup configuration. This will remove rbenv shims directory from PATH, and future invocations like ruby will execute the system Ruby version, as before rbenv.

    While disabled, rbenv will still be accessible on the command line, but your Ruby apps won't be affected by version switching.

  2. To completely uninstall rbenv, perform step (1) and then remove its root directory. This will delete all Ruby versions that were installed under `rbenv root`/versions/ directory:

     rm -rf `rbenv root`
    

    If you've installed rbenv using a package manager, as a final step perform the rbenv package removal:

    • Homebrew: brew uninstall rbenv
    • Debian, Ubuntu, and their derivatives: sudo apt purge rbenv
    • Archlinux and its derivatives: sudo pacman -R rbenv

Command Reference

Like git, the rbenv command delegates to subcommands based on its first argument. The most common subcommands are:

rbenv local

Sets a local application-specific Ruby version by writing the version name to a .ruby-version file in the current directory. This version overrides the global version, and can be overridden itself by setting the RBENV_VERSION environment variable or with the rbenv shell command.

rbenv local 1.9.3-p327

When run without a version number, rbenv local reports the currently configured local version. You can also unset the local version:

rbenv local --unset

rbenv global

Sets the global version of Ruby to be used in all shells by writing the version name to the ~/.rbenv/version file. This version can be overridden by an application-specific .ruby-version file, or by setting the RBENV_VERSION environment variable.

rbenv global 1.8.7-p352

The special version name system tells rbenv to use the system Ruby (detected by searching your $PATH).

When run without a version number, rbenv global reports the currently configured global version.

rbenv shell

Sets a shell-specific Ruby version by setting the RBENV_VERSION environment variable in your shell. This version overrides application-specific versions and the global version.

rbenv shell jruby-1.7.1

When run without a version number, rbenv shell reports the current value of RBENV_VERSION. You can also unset the shell version:

rbenv shell --unset

Note that you'll need rbenv's shell integration enabled (step 3 of the installation instructions) in order to use this command. If you prefer not to use shell integration, you may simply set the RBENV_VERSION variable yourself:

export RBENV_VERSION=jruby-1.7.1

rbenv versions

Lists all Ruby versions known to rbenv, and shows an asterisk next to the currently active version.

$ rbenv versions
  1.8.7-p352
  1.9.2-p290
* 1.9.3-p327 (set by /Users/sam/.rbenv/version)
  jruby-1.7.1
  rbx-1.2.4
  ree-1.8.7-2011.03

rbenv version

Displays the currently active Ruby version, along with information on how it was set.

$ rbenv version
1.9.3-p327 (set by /Users/sam/.rbenv/version)

rbenv rehash

Installs shims for all Ruby executables known to rbenv (i.e., ~/.rbenv/versions/*/bin/*). Run this command after you install a new version of Ruby, or install a gem that provides commands.

$ rbenv rehash

rbenv which

Displays the full path to the executable that rbenv will invoke when you run the given command.

$ rbenv which irb
/Users/sam/.rbenv/versions/1.9.3-p327/bin/irb

rbenv whence

Lists all Ruby versions with the given command installed.

$ rbenv whence rackup
1.9.3-p327
jruby-1.7.1
ree-1.8.7-2011.03

Environment variables

You can affect how rbenv operates with the following settings:

name default description
RBENV_VERSION Specifies the Ruby version to be used.
Also see rbenv shell
RBENV_ROOT ~/.rbenv Defines the directory under which Ruby versions and shims reside.
Also see rbenv root
RBENV_DEBUG Outputs debug information.
Also as: rbenv --debug <subcommand>
RBENV_HOOK_PATH see wiki Colon-separated list of paths searched for rbenv hooks.
RBENV_DIR $PWD Directory to start searching for .ruby-version files.

Development

The rbenv source code is hosted on GitHub. It's clean, modular, and easy to understand, even if you're not a shell hacker.

Tests are executed using Bats:

$ bats test
$ bats test/<file>.bats

Please feel free to submit pull requests and file bugs on the issue tracker.

Comments
  • rbenv: rails: command not found

    rbenv: rails: command not found

    How do you run gem executables without Bundler / bundle exec?

    ~ $ rbenv rehash
    ~ $ rbenv global
    1.9.2-p290
    ~ $ gem which rails
    /Users/meleyal/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails.rb
    ~ $ rails new test
    rbenv: rails: command not found
    
    The `rails' command exists in these Ruby versions:
      1.8.7-p352
    
    ~ $ bundle exec rails new test
    Could not locate Gemfile
    

    Maybe related to #40, #61

    opened by meleyal 85
  • : No such file or directory

    : No such file or directory

    Hi all. I have problem after update rbenv. I runing git pull origin in ~/.rbenv. Аfter that, when I run any commands for example: $ rbenv install --list. I got error : No such file or directory. Have you any idea fix it? rbenv-doctor.sh output https://gist.github.com/avastor/ffabb80ed048c3c69061

    ========================================================================
    $ ls -ls ~/.rbenv/bin/
    total 4
    0 lrwxrwxrwx 1 user group  16 Nov  3 13:42 rbenv -> ../libexec/rbenv
    4 -rwxrwxr-x 1 user group 747 Nov  3 13:40 ruby-local-exec
    ========================================================================
    ~/.rbenv$ git remote -v
    origin  https://github.com/sstephenson/rbenv.git (fetch)
    origin  https://github.com/sstephenson/rbenv.git (push)
    ~/.rbenv$ git branch 
    * master
    ~/.rbenv$ git log -1
    commit 7e0e85bdda092d94aef0374af720682c6ea8999d
    Author: Mislav Marohnić <[email protected]>
    Date:   Sun Oct 19 18:06:09 2014 +0200
    
        Avoid JRuby warning during rehash Rubygems plugin
    
        As it seems, JRuby 1.7 complains on stderr every time you invoke `system`:
    
            warning: executable? does not in this environment and will return a dummy value
    
        It doesn't seem to complain when backtics are used. It's safe to use
        backticks here because `rbenv rehash` doesn't output anything on stdout,
        and the exit status of the command is irrelevant.
    ========================================================================
    # my ~/.bashrc
    export RBENV_ROOT="${HOME}/.rbenv"
    if [ -d "${RBENV_ROOT}" ]; then
      export PATH="${RBENV_ROOT}/bin:${PATH}"
      eval "$(rbenv init -)"
    fi
    ========================================================================
    $ . ~/.bashrc 
    : No such file or directory
    ========================================================================
    $ type rbenv 
    rbenv is hashed (/home/user/.rbenv/bin/rbenv)
    
    opened by ghost 44
  • Ruby 2.1.1 build failed on Mavericks

    Ruby 2.1.1 build failed on Mavericks

    Hey,

    I'm having trouble installing Ruby 2.1.1 on my iMac running OSX 10.9.2 (Mavericks). Can someone identify the issue from my log?

    $ rbenv install 2.1.1
    Downloading ruby-2.1.1.tar.gz...
    -> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
    Installing ruby-2.1.1...
    
    BUILD FAILED
    
    Inspect or clean up the working tree at /var/folders/ft/wdkgq_yx5r91dwfm9mbcyyxw0000gn/T/ruby-build.20140415004206.96361
    Results logged to /var/folders/ft/wdkgq_yx5r91dwfm9mbcyyxw0000gn/T/ruby-build.20140415004206.96361.log
    
    compiling ossl_x509store.c
    installing default openssl libraries
    linking shared-object openssl.bundle
    linking shared-object ripper.bundle
    make: *** [build-ext] Error 2
    
    opened by vincenzomerolla 40
  • Runaway ruby process when running gem installed binaries - yosemite

    Runaway ruby process when running gem installed binaries - yosemite

    Yosemite, rbenv 0.4.0 installed via homebrew. Rubies installed via ruby-build and rbenv install ... - have repeated this with ruby 2.1.2 and 2.1.5.

    I originally saw this with travis but I'm also now seeing it with bundler.

    If I start an app that goes via the rbenv shims then I get what appears to be a hanging app and and ever increasing number of ruby and sh processes

    Here's an example from top:

    PID    COMMAND      %CPU TIME     #TH   #WQ  #PORT MEM    PURG   CMPRS  PGRP
    39409  ruby         0.0  00:00.06 2/1   0    13+   8952K+ 0B     0B     39182
    39408  sh           0.0  00:00.00 1     0    9+    396K+  0B     0B     39182
    39407  ruby         0.0  00:00.10 2     0    13+   11M+   0B     0B     39182
    39406  sh           0.0  00:00.00 1     0    9+    384K+  0B     0B     39182
    39405  ruby         0.0  00:00.09 2     0    13+   10M+   0B     0B     39182
    39404  sh           0.0  00:00.00 1     0    9+    384K+  0B     0B     39182
    39403  ruby         0.0  00:00.11 2     0    13+   10M+   0B     0B     39182
    39402  sh           0.0  00:00.00 1     0    9+    384K+  0B     0B     39182
    39401  ruby         0.0  00:00.10 2     0    13+   10M+   0B     0B     39182
    39400  sh           0.0  00:00.00 1     0    9+    384K+  0B     0B     39182
    39399  ruby         0.0  00:00.10 2     0    13+   11M+   0B     0B     39182
    39398  sh           0.0  00:00.00 1     0    9+    384K+  0B     0B     39182
    

    Managed to grab a PS too:

    1747672883 62001 62000   0 11:45AM ttys001    0:00.09 /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb
    1747672883 62002 62001   0 11:45AM ttys001    0:00.00 sh -c /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb 2>&1
    1747672883 62003 62002   0 11:45AM ttys001    0:00.10 /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb
    1747672883 62004 62003   0 11:45AM ttys001    0:00.00 sh -c /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb 2>&1
    1747672883 62005 62004   0 11:45AM ttys001    0:00.10 /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb
    1747672883 62006 62005   0 11:45AM ttys001    0:00.00 sh -c /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb 2>&1
    1747672883 62007 62006   0 11:45AM ttys001    0:00.10 /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb
    1747672883 62008 62007   0 11:45AM ttys001    0:00.00 sh -c /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb 2>&1
    1747672883 62009 62008   0 11:45AM ttys001    0:00.09 /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb
    1747672883 62010 62009   0 11:45AM ttys001    0:00.00 sh -c /usr/local/opt/rbenv/versions/2.1.2/bin/ruby extconf.rb 2>&1
    

    This continues until I either kill the command or I hit the maximum number of processes for the machine.

    Any ideas what's failing?

    opened by chrissearle 34
  • No bundle shim; rbenv: bundle: command not found

    No bundle shim; rbenv: bundle: command not found

    I'm trying to install rbenv on a machine that previously had rvm installed. I've followed the various instructions to remove all vestiges of rvm. But I have the following problems, which I assume are related:

    1. Trying to install nokogiri 1.6.0 gives an error indicating the bundle command can't find the ruby 1.9.2 version that rbenv says is the current one.

    2. There is no 'bundle' shim in ~/.rbenv/shims

    3. which bundle gives /usr/bin/bundle

    4. rbenv which bundle gives rbenv: bundle: command not found

    I've removed /usr/bin from my path as mentioned in a similar issue elsewhere here. Do I need to uninstall and reinstall bundler?

    Any and all help or guidance would be greatly appreciated.

    Thanks!

    Dean Richardson

    opened by genlighten 31
  • rehash problem with rubinius master

    rehash problem with rubinius master

    Hello, I'm trying to get rubinius to work with rbenv but I'm having no luck with that.

    What i did is:

    • compiled and installed rubinius to ~/.rbenv/versions/rbx-2.0.0-dev.
    • rbx console seems to work fine.
    • cd my-project-dir (which has a .rbenv-version file pointing to rbx-2.0.0-dev)
    • rbx gem install bundler
    • rbenv rehash
    • bundle install

    What i get is :

    rbenv: bundle: command not found

    The `bundle' command exists in these Ruby versions: 1.9.2-p290 1.9.3-p0 1.9.3-preview1 rbx-1.2.4

    I tried running bundle install from the gem folder with

    ~/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/bundler-1.0.21/bin/bundle install

    and it worked (although it gave an error installing a gem, but that's not rbenv's fault).

    Anyone has an idea on what's going on?

    Thanks a lot

    Marco

    binpath 
    opened by Marchino 30
  • You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory

    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory

    I have installed Hombrew .And have rbenv installed by brew install rbenv. But when i run gem install bundler ,it said : You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. I want to install Bundler to manage gems, but it failed. Maybe something wrong with me ,can you help me ?

    opened by GuoZhiQiang 29
  • The master branch of rbenv breaks inside of tmux.

    The master branch of rbenv breaks inside of tmux.

    When using the master branch version of rbenv, tmux no longer respects rbenv. For example I have global ruby setup to 2.0.0-p0 and when I run rbenv version it correctly reports 2.0.0-p0, it is also correctly reported when I run ruby --version. Now in the same session I start a new tmux session using tmux new. Now when I run rbenv version it still correctly reports 2.0.0-p0, however when I run ruby --version it now reports 1.8.7. When I run which ruby it shows me /usr/bin/ruby instead of the ruby shim.

    opened by tmiller 29
  • rbenv rehash on El Capitan does not working

    rbenv rehash on El Capitan does not working

    Hi, After installation of gems like rails and bundle, that need to share their executables in shims directory and running rbenv rehash - nothing happens, there are no executables in shims directory :(

    unconfirmed 
    opened by alec-c4 28
  • unable to set global or or local ruby on freebsd

    unable to set global or or local ruby on freebsd

    Hello, I just install rbnev on freebsd 9.1. when I set a global ruby, the chosen ruby is lost, when I relog the problem appear in this line I try to reinstall many time, I try : "rbenv global --unset" but i always obtain the folowing error : /home/jeezs/.rbenv/libexec/rbenv-version-file-read: line 23: /dev/fd/62: No such file or directory so I check on some forum and they say I need to symlink this, so I also try : sudo ln -s /proc/self/fd /dev/fd It doesn't work to. so here is the debug file from rbenv:

    + rbenv --version
    rbenv 0.4.0-45-g060f141
    + rbenv versions
    /home/jeezs/.rbenv/libexec/rbenv-version-file-read: line 23: /dev/fd/62: No such file or directory
      1.8.7-p371
      2.0.0-p195
    + rbenv global
    system
    + env
    + grep -E 'PATH|RUBY|BUNDLE|RBENV'
    PATH=/home/jeezs/.rbenv/shims:/home/jeezs/.rbenv/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/jeezs/bin
    + which gem
    /home/jeezs/.rbenv/shims/gem
    + rbenv which gem
    /home/jeezs/.rbenv/libexec/rbenv-version-file-read: line 23: /dev/fd/62: No such file or directory
    rbenv: gem: command not found
    
    The `gem' command exists in these Ruby versions:
      1.8.7-p371
      2.0.0-p195
    
    + cat /etc/gemrc
    cat: /etc/gemrc: No such file or directory
    + cat /home/jeezs/.gemrc
    cat: /home/jeezs/.gemrc: No such file or directory
    + gem env
    /home/jeezs/.rbenv/libexec/rbenv-version-file-read: line 23: /dev/fd/62: No such file or directory
    rbenv: gem: command not found
    
    The `gem' command exists in these Ruby versions:
      1.8.7-p371
      2.0.0-p195 
    

    Can you help?

    Thanks

    opened by jeezs 27
  • can't rehash, .rbenv shims exists, but it doesn't

    can't rehash, .rbenv shims exists, but it doesn't

    I'm using a shared install of rbenv as per https://github.com/sstephenson/rbenv/wiki/shared-install-of-rbenv

    In general, it was working, when I only had one ruby installed. But now I installed a jruby too, and have set it using rbenv shell.

    And for some reason rbenv rehash ain't working when jruby is active.

    bash-3.2$ rbenv rehash
    rbenv: cannot rehash: /usr/local/rbenv/shims/.rbenv-shim exists
    bash-3.2$ ls -l /usr/local/rbenv/shims/.rbenv-shim
    ls: /usr/local/rbenv/shims/.rbenv-shim: No such file or directory
    

    Any ideas of where I should start troubleshooting here?

    opened by jrochkind 27
  • Empty shims directory. rbenv rehash fails silently

    Empty shims directory. rbenv rehash fails silently

    As far as I can tell, everything is installed correctly. But for whatever reason, I'm still getting system ruby.

    When I run rbenv rehash it doesn't seem to do anything at all.

    Any ideas on what I'm doing wrong?

    rbenv-doctor output

    ❯ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-doctor | bash
    Checking for `rbenv' in PATH: /opt/homebrew/bin/rbenv
    Checking for rbenv shims in PATH: OK
    Checking `rbenv install' support: /opt/homebrew/bin/rbenv-install (ruby-build 20221206)
    Counting installed Ruby versions: 2 versions
    Auditing installed plugins: OK
    

    ruby version

    ❯ rbenv versions      
    * 3.1.2 (set by /Users/lynn/.ruby-version)
      3.1.3
    

    path

    ❯ echo $PATH | grep --color=auto "$(rbenv root)/shims"
    /Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools
    

    which ruby

    ❯ which ruby
    /usr/bin/ruby
    

    rehash debug output

    ❯ rbenv --debug rehash
    +(/opt/homebrew/bin/rbenv:23): enable -f /opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-realpath.dylib realpath
    +(/opt/homebrew/bin/rbenv:54): '[' -z '' ']'
    +(/opt/homebrew/bin/rbenv:55): RBENV_ROOT=/Users/lynn/.rbenv
    +(/opt/homebrew/bin/rbenv:59): export RBENV_ROOT
    +(/opt/homebrew/bin/rbenv:61): '[' -z '' ']'
    +(/opt/homebrew/bin/rbenv:62): RBENV_DIR=/Users/lynn/.rbenv
    +(/opt/homebrew/bin/rbenv:69): export RBENV_DIR
    +(/opt/homebrew/bin/rbenv:71): '[' -n '' ']'
    +(/opt/homebrew/bin/rbenv:71): export 'RBENV_ORIG_PATH=/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +(/opt/homebrew/bin/rbenv:71): RBENV_ORIG_PATH='/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +(/opt/homebrew/bin/rbenv:73): shopt -s nullglob
    ++(/opt/homebrew/bin/rbenv:75): abs_dirname /opt/homebrew/bin/rbenv
    ++(/opt/homebrew/bin/rbenv:25): abs_dirname(): local path
    +++(/opt/homebrew/bin/rbenv:26): abs_dirname(): realpath /opt/homebrew/bin/rbenv
    ++(/opt/homebrew/bin/rbenv:26): abs_dirname(): path=/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv
    ++(/opt/homebrew/bin/rbenv:27): abs_dirname(): echo /opt/homebrew/Cellar/rbenv/1.2.0/libexec
    +(/opt/homebrew/bin/rbenv:75): bin_path=/opt/homebrew/Cellar/rbenv/1.2.0/libexec
    +(/opt/homebrew/bin/rbenv:76): for plugin_bin in '"${RBENV_ROOT}/plugins/"*/bin'
    +(/opt/homebrew/bin/rbenv:77): PATH='/Users/lynn/.rbenv/plugins/rbenv-update/bin:/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +(/opt/homebrew/bin/rbenv:79): export 'PATH=/opt/homebrew/Cellar/rbenv/1.2.0/libexec:/Users/lynn/.rbenv/plugins/rbenv-update/bin:/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +(/opt/homebrew/bin/rbenv:79): PATH='/opt/homebrew/Cellar/rbenv/1.2.0/libexec:/Users/lynn/.rbenv/plugins/rbenv-update/bin:/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +(/opt/homebrew/bin/rbenv:81): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d
    +(/opt/homebrew/bin/rbenv:82): '[' /opt/homebrew/Cellar/rbenv/1.2.0 '!=' /Users/lynn/.rbenv ']'
    +(/opt/homebrew/bin/rbenv:84): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d
    +(/opt/homebrew/bin/rbenv:86): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d:/opt/homebrew/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks
    +(/opt/homebrew/bin/rbenv:87): for plugin_hook in '"${RBENV_ROOT}/plugins/"*/etc/rbenv.d'
    +(/opt/homebrew/bin/rbenv:88): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d:/opt/homebrew/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks:/Users/lynn/.rbenv/plugins/rbenv-bundle-exec/etc/rbenv.d
    +(/opt/homebrew/bin/rbenv:87): for plugin_hook in '"${RBENV_ROOT}/plugins/"*/etc/rbenv.d'
    +(/opt/homebrew/bin/rbenv:88): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d:/opt/homebrew/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks:/Users/lynn/.rbenv/plugins/rbenv-bundle-exec/etc/rbenv.d:/Users/lynn/.rbenv/plugins/rbenv-default-gems/etc/rbenv.d
    +(/opt/homebrew/bin/rbenv:87): for plugin_hook in '"${RBENV_ROOT}/plugins/"*/etc/rbenv.d'
    +(/opt/homebrew/bin/rbenv:88): RBENV_HOOK_PATH=:/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d:/opt/homebrew/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks:/Users/lynn/.rbenv/plugins/rbenv-bundle-exec/etc/rbenv.d:/Users/lynn/.rbenv/plugins/rbenv-default-gems/etc/rbenv.d:/Users/lynn/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d
    +(/opt/homebrew/bin/rbenv:90): RBENV_HOOK_PATH=/Users/lynn/.rbenv/rbenv.d:/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d:/opt/homebrew/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks:/Users/lynn/.rbenv/plugins/rbenv-bundle-exec/etc/rbenv.d:/Users/lynn/.rbenv/plugins/rbenv-default-gems/etc/rbenv.d:/Users/lynn/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d
    +(/opt/homebrew/bin/rbenv:91): export RBENV_HOOK_PATH
    +(/opt/homebrew/bin/rbenv:93): shopt -u nullglob
    +(/opt/homebrew/bin/rbenv:96): command=rehash
    +(/opt/homebrew/bin/rbenv:97): case "$command" in
    ++(/opt/homebrew/bin/rbenv:110): command -v rbenv-rehash
    +(/opt/homebrew/bin/rbenv:110): command_path=/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash
    +(/opt/homebrew/bin/rbenv:111): '[' -z /opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash ']'
    +(/opt/homebrew/bin/rbenv:119): shift 1
    +(/opt/homebrew/bin/rbenv:120): '[' '' = --help ']'
    +(/opt/homebrew/bin/rbenv:127): exec /opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:7): SHIM_PATH=/Users/lynn/.rbenv/shims
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:8): PROTOTYPE_SHIM_PATH=/Users/lynn/.rbenv/shims/.rbenv-shim
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:11): mkdir -p /Users/lynn/.rbenv/shims
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:17): set -o noclobber
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:27): set +o noclobber
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:31): trap remove_prototype_shim EXIT
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:148): shopt -s nullglob
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:152): create_prototype_shim
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:59): create_prototype_shim(): cat
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:59): create_prototype_shim(): rbenv_path
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:40): rbenv_path(): local found
    +++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:41): rbenv_path(): PATH='/Users/lynn/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/lynn/Library/Preferences/netlify/helper/bin:/Users/lynn/.pyenv/shims:/usr/local/lib/python3.9/site-packages:/usr/local/opt/openjdk/bin:/Users/lynn/.yarn/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/lynn/.zinit/polaris/bin:~/.cargo/bin:/usr/local/heroku/bin:node_modules/.bin:/Users/lynn/gocode/bin:/usr/local/go/bin:/opt/homebrew/opt/llvm/bin:/Users/lynn/bin:/opt/adt-bundle-mac-x86_64/sdk/tools:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/lynn/.cargo/bin:/Applications/kitty.app/Contents/MacOS:/Users/lynnhurley/bin/FDK/Tools/osx:/Applications/SuperCollider/SuperCollider.app/Contents/Resources/:/Users/lynn/Library/Android/sdk/emulator:/Users/lynn/Library/Android/sdk/tools:/Users/lynn/Library/Android/sdk/tools/bin:/Users/lynn/Library/Android/sdk/platform-tools'
    +++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:41): rbenv_path(): command -v rbenv
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:41): rbenv_path(): found=/opt/homebrew/bin/rbenv
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:42): rbenv_path(): [[ /opt/homebrew/bin/rbenv == /* ]]
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:43): rbenv_path(): echo /opt/homebrew/bin/rbenv
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:82): create_prototype_shim(): chmod +x /Users/lynn/.rbenv/shims/.rbenv-shim
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:153): remove_outdated_shims
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:89): remove_outdated_shims(): local shim
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:155): registered_shims=($(list_executable_names | sort -u))
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:155): list_executable_names
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:100): list_executable_names(): local version file
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:155): sort -u
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:101): list_executable_names(): rbenv-versions --bare --skip-aliases
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:102): list_executable_names(): read -r version
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:10): unset bare
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:11): unset skip_aliases
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:13): for arg in '"$@"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:14): case "$arg" in
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:19): bare=1
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:13): for arg in '"$@"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:14): case "$arg" in
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:20): skip_aliases=1
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:28): versions_dir=/Users/lynn/.rbenv/versions
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:30): enable -f /opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-realpath.dylib realpath
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:62): '[' -d /Users/lynn/.rbenv/versions ']'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:63): realpath /Users/lynn/.rbenv/versions
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:63): versions_dir=/Users/lynn/.rbenv/versions
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:80): '[' -n 1 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:81): list_versions
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:67): list_versions(): shopt -s nullglob
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:68): list_versions(): for path in '"$versions_dir"/*'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:69): list_versions(): '[' -d /Users/lynn/.rbenv/versions/3.1.2 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:70): list_versions(): '[' -n 1 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:70): list_versions(): '[' -L /Users/lynn/.rbenv/versions/3.1.2 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:74): list_versions(): echo 3.1.2
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:68): list_versions(): for path in '"$versions_dir"/*'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:69): list_versions(): '[' -d /Users/lynn/.rbenv/versions/3.1.3 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:70): list_versions(): '[' -n 1 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:70): list_versions(): '[' -L /Users/lynn/.rbenv/versions/3.1.3 ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:74): list_versions(): echo 3.1.3
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:77): list_versions(): shopt -u nullglob
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-versions:82): exit 0
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo bundle
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo bundler
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo erb
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo gem
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo irb
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo racc
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rake
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rbs
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rdbg
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rdoc
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo ri
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo ruby
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo typeprof
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:102): list_executable_names(): read -r version
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo bundle
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo bundler
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo erb
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo gem
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo irb
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo racc
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rake
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rbs
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rdbg
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo rdoc
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo ri
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo ruby
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:103): list_executable_names(): for file in '"${RBENV_ROOT}/versions/${version}/bin/"*'
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:104): list_executable_names(): echo typeprof
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:102): list_executable_names(): read -r version
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:158): OLDIFS=' 	
    '
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:159): IFS='
    '
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:159): scripts=(`rbenv-hooks rehash`)
    ++(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:159): rbenv-hooks rehash
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:9): '[' rehash = --complete ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:18): RBENV_COMMAND=rehash
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:19): '[' -z rehash ']'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:24): enable -f /opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-realpath.dylib realpath
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:55): IFS=:
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:55): hook_paths=($RBENV_HOOK_PATH)
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:57): shopt -s nullglob
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:58): for path in '"${hook_paths[@]}"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:58): for path in '"${hook_paths[@]}"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:58): for path in '"${hook_paths[@]}"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:58): for path in '"${hook_paths[@]}"'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:59): for script in '"$path/$RBENV_COMMAND"/*.bash'
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-hooks:60): realpath /usr/local/etc/rbenv.d/rehash/bundler.bash
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:159): remove_prototype_shim
    +(/opt/homebrew/Cellar/rbenv/1.2.0/libexec/rbenv-rehash:34): remove_prototype_shim(): rm -f /Users/lynn/.rbenv/shims/.rbenv-shim
    

    rbenv dir permissions

    ❯ ls -al ~/.rbenv 
    drwxr-xr-x - lynn 14 Dec 10:36 cache
    drwxr-xr-x - lynn 13 Dec 15:19 plugins
    drwxr-xr-x - lynn 14 Dec 10:39 shims
    .rw-r--r-- 6 lynn 14 Dec 10:25 version
    drwxr-xr-x - lynn 14 Dec 10:18 versions
    

    shims dir contents (empty)

    ~/.rbenv on ☁️  us-east-1 
    ❯ ls -al ~/.rbenv/shims
    
    ~/.rbenv on ☁️  us-east-1 
    ❯ 
    
    opened by lynndylanhurley 2
  • Enable fallback to PATH from rbenv shims

    Enable fallback to PATH from rbenv shims

    Previously, when someone activated rbenv shim foo, rbenv would error out if RBENV_ROOT/versions/RBENV_VERSION/bin/foo did not exist.

    This change allows foo to be additionally looked up in PATH as fallback. This prevents a case where one of the Ruby versions is shadowing a system-wide command of the same name, preventing the use of the global command across all other Ruby versions.

    rbenv used to be strict around this: the lack of a fallback mechanism was to avoid ever falling back to system Ruby for invocations like bundle if the current Ruby version did not yet install Bundler. The current approach prevents this scenario by explicitly disallowing fallback for the following executables: ruby, rake, gem, bundle, bundler, irb, rdoc, ri.

    Fixes https://github.com/rbenv/rbenv/issues/187 Fixes https://github.com/rbenv/rbenv/issues/865 /cc @jasonkarns Closes https://github.com/rbenv/rbenv/pull/1110

    Additionally, this changeset is a followup to https://github.com/rbenv/rbenv/pull/1436 by bumping up GEM_HOME so it takes precedence over executables found in PATH.

    @konsolebox: Since you've previously provided helpful warnings around other potentially risky changes, does this one raise any warning flags for you? Thanks

    opened by mislav 7
  • rbenv shell: Avoid warning about global variables when enabled in zsh

    rbenv shell: Avoid warning about global variables when enabled in zsh

    I suggest that the script generated by rbenv init - zsh also generates the command typeset -g RBENV_VERSION_OLD at the top of the shell function rbenv. It does not harm or degrade the performance, but if a user has in his .zshrc a setopt warn_create_global, using the rbenv shell command issues a warning (eval):1: scalar parameter RBENV_VERSION_OLD created globally in function rbenv.

    opened by rovf 1
  • rbenv-exec only allows executables found by rbenv-which

    rbenv-exec only allows executables found by rbenv-which

    I don't think this is really a bug but more of a feature request. Presently, rbenv exec doesn't do what is advertised on the cover. Per the help:

    Runs an executable by first preparing PATH so that the selected Ruby
    version's `bin' directory is at the front.
    
    For example, if the currently selected Ruby version is 1.9.3-p327:
      rbenv exec bundle install
    
    is equivalent to:
      PATH="$RBENV_ROOT/versions/1.9.3-p327/bin:$PATH" bundle install
    

    To me, this means that rbenv exec foo should be the same as PATH="$RBENV_ROOT/versions/1.9.3-p327/bin:$PATH" foo. But instead, rbenv-exec checks rbenv-which first. So if the provided command doesn't exist under the currently selected ruby, then we get an error rather than simply invoking the command.

    I'm not sure if this behavior belongs in rbenv-exec (though that's my inclination). But it should be possible to simply execute a command while letting rbenv set up the correct PATH for me first.

    feature 
    opened by jasonkarns 4
Releases(v1.2.0)
  • v1.2.0(Sep 29, 2021)

    Feature changes

    • Have shims survive upgrades via Homebrew #1350

    • Improve init: warn about missing shell and name the shell explicitly in the template #1099

    • Sort rbenv versions output semantically #1111

    • Remove misleading set by $(rbenv-version-origin) message when system ruby is in use #1203

    • Output more information in RBENV_DEBUG mode #1307

    • Improve compatibility with bash set -u (nounset) mode #1243

    • Remove fish completion script #1212

    Fixes

    • Speed up rehash #1334

    • Disallow path segments and directory traversal in .ruby-version files #1156

    • Avoid type: write error: broken pipe warning https://github.com/rbenv/rbenv/pull/1195

    • Fix fish shell initialization #1220

    • Avoid unintentional globbing in bash completion #1253

    • Strip -<suffix> when detecting the shell #1311

    • Supply head -n flag explicitly #1332

    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Mar 25, 2019)

    • Fix rehash mechanism for versions of bash that complain about clobbering /dev/null

    • Enforce absolute RBENV_DIR to avoid having to unset CDPATH

    • rbenv-version-file: ensure that the version file is a file

    • rbenv init -: fix output to work without args and set -u

    • rbenv shell: better error message when shell integration wasn't enabled

    • Enable freezing rbenv version via rbenv version-name > .ruby-version in the shell

    • rbenv-which: avoid changing PATH unless necessary

    • rbenv-prefix: do not silence rbenv-which errors for system version

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Jun 15, 2017)

  • v1.1.0(Nov 25, 2016)

    Backwards incompatible:

    • Remove deprecated ruby-local-exec executable
    • Remove support for .rbenv-version legacy version file
    • Remove support for default, global legacy global version files

    Features:

    • Add support for rbenv shell - style of invocation that restores previous version

    Housekeeping:

    • Adopt Contributor Covenant 1.4
    • Replace . with source for fish shell
    • Unset CDPATH if it's set by the user
    • Fix rbenv <cmd> --help for sh-* commands
    • Expand literal tilde in PATH
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Dec 24, 2015)

    rbenv is a robust tool that follows the UNIX methodology to implement per-project selection of Ruby versions and related runtime environment. The rbenv community maintains an ecosystem of plugins, and rbenv has inspired many other forks for managing environments of different programming languages and other software tools.

    rbenv works by:

    1. Having its shims/ directory prepended to PATH environment variable;
    2. Reading a .ruby-version file in the project's directory that specifies the Ruby version to be activated.

    How to install/upgrade

    The rbenv-installer script automates installation or upgrading rbenv on your system with either Homebrew (if available) or by using git to install to ~/.rbenv directory.

    For manual installation instructions and more details, see Installation chapter of rbenv README.

    Changes since v0.4.0

    Speed :racehorse:

    • Speed up rbenv with dynamically loaded realpath C extension
    • Speed up rbenv rehash when there are many Ruby versions with similar sets of executables
    • Improve performance of rbenv-which for "system" version
    • Avoid rbenv-exec calling out to rbenv-version-name twice

    To compile the optional C extension that speeds up rbenv across the board:

    # substitute with location where you installed rbenv source:
    $ cd ~/.rbenv
    $ src/configure && make -C src
    

    New features :gift:

    • New plugin hooks version-name and version-origin enable plugin authors to hook into version selection logic.
    • rbenv versions --skip-aliases --bare will only list versions that are not aliases (symlinks) for other versions.
    • rbenv version-file <dir> finds a .ruby-version file in the target directory or any of its parent directories.
    • rbenv init now recognizes and supports fish shell syntax. :fish:
    • rbenv --debug <command> is a shortcut for enabling RBENV_DEBUG.

    Shell integration :shell:

    • Fix rbenv() shell function in ksh and dash
    • Ubuntu fix: use source instead of .
    • Reliably detect user's current shell in rbenv init
    • Improve detection of completion support for commands
    • Fix detecting completions support on OpenBSD
    • Check if completion script is readable
    • Suppress shell warnings when hashing is disabled by set +h
    • rbenv() shell function preserves multiline output of sh-* commands

    General enhancements :sparkles:

    • rbenv local now respects .ruby-version file in parent directories as well
    • rbenv versions now emits a warning when no Ruby versions were found
    • Consistently support rbenv <command> --help as alternative to rbenv help <command>
    • Improve parsing of git revision in rbenv --version when rbenv was installed from git
    • Export PS4 when RBENV_DEBUG is set for more informative debug output

    Bug fixes :beetle:

    • Fix incorrect formatting of rbenv-help output under MAWK (Ubuntu)
    • Prefer gawk over awk if both are available
    • Fix resolving symlinks in rbenv-hooks
    • Fix iterating through paths that have spaces in them
    • Fix rbenv rehash when paths have spaces in them
    • More useful error message when rehash fails on a non-writable directory
    • Make rbenv-exec fail for invalid Ruby version
    • Bail out early if readlink is not available
    • Properly resolve symlinks when listing hook scripts
    • Better error message for rbenv prefix system
    • Fix reading .ruby-version on platforms that don't support process substitution
    • Remove carriage return characters in .ruby-version files
    • Fixes rbenv on OpenBSD and other systems that don't support head -c
    • Guard against exported CDPATH
    • Ensure that IFS is reset to its original value within hook scripts
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Oct 7, 2013)

    New features

    • rbenv now prefers .ruby-version files to .rbenv-version files for specifying local application-specific versions. The .ruby-version file has the same format as .rbenv-version but is compatible with other Ruby version managers.
    • Deprecated ruby-local-exec and moved its functionality into the standard ruby shim. See the ruby-local-exec wiki page for upgrade instructions.
    • Modified shims to include the full path to rbenv so that they can be invoked without having rbenv's bin directory in the $PATH.
    • Reworked rbenv help so that usage and documentation is stored as a comment in each subcommand, enabling plugin commands to hook into the help system.
    • Added support for full completion of the command line, not just the first argument.
    • Added rbenv --version for printing the current version of rbenv.
    • Added /usr/lib/rbenv/hooks to the plugin hook search path.

    Other changes and bug fixes

    • Sped up rbenv init by avoiding rbenv reinitialization and by using a simpler indexing approach.
    • Updated installation instructions for Zsh and Ubuntu users.
    • Fixed rbenv which and rbenv prefix with system Ruby versions.
    • Changed rbenv exec to avoid prepending the system Ruby location to $PATH to fix issues running system Ruby commands that invoke other commands.
    • Changed rbenv rehash to ensure it exits with a 0 status code under normal operation, and to ensure outdated shims are removed first when rehashing.
    • Modified rbenv rehash to run hash -r afterwards, when shell integration is enabled, to ensure the shell's command cache is cleared.
    • Removed use of the += operator to support older versions of Bash.
    • Adjusted non-bare rbenv versions output to include system, if present.
    • Improved documentation for installing and uninstalling Ruby versions.
    • Fixed rbenv versions not to display a warning if the currently specified version doesn't exist.
    • Fixed an instance of local variable leakage in the rbenv shell function wrapper.
    • Changed rbenv shell to ensure it exits with a non-zero status on failure.
    • Fixed rbenv which to account for path entries with spaces.
    • Changed rbenv init to accept option arguments in any order.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Oct 7, 2013)

    • Added an rbenv root command which prints the value of $RBENV_ROOT, or the default root directory if it's unset.
    • Clarified Zsh installation instructions in the Readme.
    • Removed some redundant code in rbenv rehash.
    • Fixed an issue with calling readlink for paths with spaces.
    • Changed Zsh initialization code to install completion hooks only for interactive shells.
    • Added preliminary support for ksh.
    • rbenv rehash creates or removes shims only when necessary instead of removing and re-creating all shims on each invocation.
    • Fixed that RBENV_DIR, when specified, would be incorrectly expanded to its parent directory.
    • Removed the deprecated set-default and set-local commands.
    • Added a --no-rehash option to rbenv init for skipping the automatic rehash when opening a new shell.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Oct 7, 2013)

    • Changed the rbenv command to ensure that RBENV_DIR is always an absolute path. This fixes an issue where Ruby scripts using the ruby-local-exec wrapper would go into an infinite loop when invoked with a relative path from the command line.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Oct 7, 2013)

    • Renamed rbenv set-default to rbenv global and rbenv set-local to rbenv local. The set- commands are deprecated and will be removed in the next major release.
    • rbenv now uses greadlink on Solaris.
    • Added a ruby-local-exec command which can be used in shebangs in place of #!/usr/bin/env ruby to properly set the project-specific Ruby version regardless of current working directory.
    • Fixed an issue with rbenv rehash when no binaries are present.
    • Added support for rbenv-sh-* commands, which run inside the current shell instead of in a child process.
    • Added an rbenv shell command for conveniently setting the $RBENV_VERSION environment variable.
    • Added support for storing rbenv versions and shims in directories other than ~/.rbenv with the $RBENV_ROOT environment variable.
    • Added support for debugging rbenv via set -x when the $RBENV_DEBUG environment variable is set.
    • Refactored the autocompletion system so that completions are now built-in to each command and shared between bash and Zsh.
    • Added support for plugin bundles in ~/.rbenv/plugins as documented in #102.
    • Added /usr/local/etc/rbenv.d to the list of directories searched for rbenv hooks.
    • Added support for an $RBENV_DIR environment variable which defaults to the current working directory for specifying where rbenv searches for local version files.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Oct 7, 2013)

    • Fixed rbenv to be more resilient against nonexistent entries in $PATH.
    • Made the rbenv rehash command operate atomically.
    • Modified the rbenv init script to automatically run rbenv rehash so that shims are recreated whenever a new shell is opened.
    • Added initial support for Zsh autocompletion.
    • Removed the dependency on egrep for reading version files.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Oct 7, 2013)

    • Fixed a syntax error in the rbenv help command.
    • Removed -e from the shebang in favor of set -e at the top of each file for compatibility with operating systems that do not support more than one argument in the shebang.
    Source code(tar.gz)
    Source code(zip)
Owner
null
A Yocto setup and management tool that helps you keep your environment up-to-date and in-sync with your team

yb (Yocto Buddy) yb is designed to make it easy to setup and (perhaps more importantly) keep Yocto environments up-to-date and in-sync with your team.

null 13 Oct 31, 2022
Quickly setup your development environment on your Chromebook/ChromeOS or any Linux distribution 🐧 ❄️ 💻 🚀 ✨

Crosup ?? ?? ?? ✨ Crosup is a CLI tool to help you quickly setup your development environment on a new Chromebook (ChromeOS) or any Linux distribution

Tsiry Sandratraina 11 Jun 15, 2023
Manage your dotfiles and packages with ease. Define your $HOME as Code 💻 🚀 ✨

EnvHub is a simple tool to manage dotfiles and packages accross multiple machines. Written in Rust, internally it uses nix/homebrew/pkgx/devbox to man

Tsiry Sandratraina 8 Oct 27, 2023
Demo app duplicated in 5 languages (Go/JavaScript/Python/Ruby/Rust) showing how to go from source code to container image using melange+apko

hello-melange-apko ?? This repo contains an example app duplicated across 5 languages showing how to: Package source code into APKs using melange Buil

Chainguard 16 Jan 23, 2023
WIP: Rust implementation of packs for ruby

packs WIP: Rust implementation of packs and packwerk for ruby Features It's entirely built in Rust, so it's really fast, and doesn't require any exter

Alex Evanczuk 9 Jun 7, 2023
Run the right version of python, in the right environment, for your project

rpy Do you deal with lots of virtual python environments? rpy is for you! Before rpy: ~/dev/prj$ env PYTHONPATH=src/py path/to/my/interpreter src/py/m

Aquatic Capital Management 2 Dec 8, 2022
⚡️(cd with env) Is a configurable cd wrapper that lets you define your environment per directory.

⚡️cdwe (cd with env) A simple configurable cd wrapper that provides powerful utilities for customizing your envionment per directory. (For ZSH / BASH

teo 20 Aug 6, 2023
A CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes

This is a CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes, as well as download any pastes you want.

Gabriel Fontes 1 Jan 26, 2022
A command line tool, manage your hundreds of repository, written with Rust

A command line tool, manage your hundreds of repository, written with Rust

Axetroy 4 Aug 16, 2022
A Command-line tool to create, manage and deploy your python projects

PPM A Command-line tool to create, manage and deploy your python projects Table of Contents PPM Main Features Create a Project project.ini file Projec

FUSEN 6 Aug 30, 2022
☘️ A simple command line tool to manage your Minecraft Bedrock worlds

☘️ Haze A simple command line tool to manage your Minecraft Bedrock worlds Haze allows you to keep your project's worlds out of the com.mojang directo

Sedge 3 Dec 8, 2022
rpm (Rust project manager) is a tool that helps you to manage your rust projects

rpm rpm (Rust project manager) is a open source tool for managing your rust project in an organized way Installation # make sure you have rust install

Dilshad 4 May 4, 2023
A cross-platofrm desktop app to manage your ports made with Dioxus and Rust.

Port Manager A cross-platofrm desktop app to manage your ports made with Dioxus and Rust. This app has been tested only on macOS. Test on other platfo

Muideen 3 Mar 30, 2024
Quickly build cool CLI apps in Rust.

QuiCLI Quickly build cool CLI apps in Rust. Getting started Read the Getting Started guide! Thanks This is only possible because of all the awesome li

Pascal Hertleif 538 Dec 5, 2022
▁▂▆▇▁▄█▁ Sparklines for Rust apps

rspark ▁▂▆▇▁▄█▁ Sparklines for Rust apps. Rust port of https://github.com/holman/spark Usage Add this to your Cargo.toml: [dependencies] rspark = "0.2

Eugene R. 50 Jun 11, 2022
A diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to retain every change.

Docchi is a diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to save very often. User'

juzy 21 Sep 19, 2022
Helps cargo build and run apps for iOS

cargo-xcodebuild Helps cargo build and run apps for iOS. ?? ⚙️ ?? Setup You need to install Xcode (NOT just Command Line Tools!), xcodegen, cargo-xcod

Igor Shaposhnik 29 Nov 22, 2022
A CLI screentime monitoring tool. Shows how much time are you using certain apps.

A screentime monitoring tool, shows how much time are you really using certain apps. It work nicely with i3status or py3status on I3 window manager fo

Piotr Czajka 6 Dec 8, 2022
Following "ZK HACK III - Building On-chain Apps Off-chain Using RISC Zero"

RISC Zero Rust Starter Template Welcome to the RISC Zero Rust Starter Template! This template is intended to give you a starting point for building a

drCathieSo.eth 3 Dec 22, 2022