Rbenv - Manage your app's Ruby environment

Last update: May 21, 2022

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.

GitHub

https://github.com/rbenv/rbenv
Comments
  • 1. 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

    Reviewed by meleyal at 2011-09-02 12:34
  • 2. : 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)
    
    Reviewed by ghost at 2014-11-03 12:38
  • 3. 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
    
    Reviewed by vincenzomerolla at 2014-04-15 05:45
  • 4. 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?

    Reviewed by chrissearle at 2014-11-14 10:46
  • 5. 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

    Reviewed by genlighten at 2014-04-08 01:02
  • 6. 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

    Reviewed by Marchino at 2012-01-17 12:04
  • 7. 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 ?

    Reviewed by GuoZhiQiang at 2016-10-11 09:26
  • 8. 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.

    Reviewed by tmiller at 2013-03-28 14:06
  • 9. 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 :(

    Reviewed by alec-c4 at 2015-09-15 10:34
  • 10. 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

    Reviewed by jeezs at 2013-06-02 07:14
  • 11. 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?

    Reviewed by jrochkind at 2012-06-20 15:48
  • 12. GPL License Compliance Issue

    The file shobj-conf in your project is released under the GPL-3.0-or-later license. According to the GPL-3.0 license, the overall project also needs to be released under GPL-3.0-or-later license. The problem is that your project is licensed under the MIT license.

    Reviewed by ISCAS-Vulab at 2022-03-18 07:46
  • 13. Add a warning or error if GEM_HOME is set

    If GEM_HOME is set this seems to break rbenv since all gems go into the same directory regardless of the Ruby version used.

    Would it be worth adding an explict check for this case like rvm does.

    Reviewed by benpjohnson at 2022-01-24 17:25
  • 14. 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.

    Reviewed by rovf at 2020-06-14 13:06
  • 15. cannot find `--user-install`d gem executable

    I have the following ruby versions installed via rbenv, 2.0.0-p648, 2.6.3 and 2.6.5 which both 2.6 versions have rubocop installed:

    Results when using 2.6.3:

    $ rbenv versions
      system
      2.0.0-p648
    * 2.6.3 (set by /Users/longspell/.ruby-version)
      2.6.5
    $ gem info rubocop
    
    *** LOCAL GEMS ***
    
    rubocop (0.80.1, 0.75.1)
        Authors: Bozhidar Batsov, Jonas Arvidsson, Yuji Nakayama
        Homepage: https://github.com/rubocop-hq/rubocop
        License: MIT
        Installed at (0.80.1): /Users/longspell/.gem/ruby/2.6.0
                     (0.75.1): /Users/longspell/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0
    
        Automatic Ruby code style checking tool.
    $ rubocop --version
    0.80.1
    

    Results when using 2.6.5:

    $ rbenv versions
      system
      2.0.0-p648
      2.6.3
    * 2.6.5 (set by /Users/longspell/test/.ruby-version)
    $ gem info rubocop
    Ignoring byebug-11.1.1 because its extensions are not built. Try: gem pristine byebug --version 11.1.1
    Ignoring io-console-0.5.6 because its extensions are not built. Try: gem pristine io-console --version 0.5.6
    
    *** LOCAL GEMS ***
    
    rubocop (0.80.1)
        Authors: Bozhidar Batsov, Jonas Arvidsson, Yuji Nakayama
        Homepage: https://github.com/rubocop-hq/rubocop
        License: MIT
        Installed at: /Users/longspell/.gem/ruby/2.6.0
    
        Automatic Ruby code style checking tool.
    $ rbenv rehash
    $ rubocop --version
    rbenv: rubocop: command not found
    
    The `rubocop' command exists in these Ruby versions:
      2.6.3
    

    Same results for solargraph. Seems to be trying to use the ~/.rbenv/versions bin instead of the ~/.gems bin path. This happens even if I am on 2.6.5 and do gem install rubocop. I've even gone so far as to gem uninstall rubocop and remove all versions from 2.6.3, but upon gem install rubocop && rbenv rehash in 2.6.5 I'm still told rubocop only exists in 2.6.3.

    Reviewed by longspell at 2020-03-26 15:07
  • 16. Either documentation or installer fails to setup shims directory correctly

    I have setup rbenv according to the documentation on a fresh CentOS 7.7 machine. The result is that the installation does not work (ruby is not found regardless of me adding it as local or global). I finally found out that the shims directory never makes it to the path and therefore executed

    echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile

    which made the stuff work. I am unsure whether the installer or rbenv init should do this or the documentation is lacking this step.

    Reviewed by crowbar27 at 2019-10-13 10:41
  • 17. Support system-wide Ruby installations

    Makes rbenv look for Ruby installations in both ~/.rbenv/versions as well as in RBENV_SYSTEM_VERSIONS_DIR, if set. This allows installing Ruby versions in a system-wide manner that's available to all users on the system.

    Reviewed by FooBarWidget at 2019-03-28 07:00
A command line tool, manage your hundreds of repository, written with Rust

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

Mar 17, 2022
An interactive shell environment for exploring the p2panda protocol
An interactive shell environment for exploring the p2panda protocol

An interactive shell environment for exploring the p2panda protocol. Uses a mock node and clients to simulate network logic.

Dec 12, 2021
Code and Development environment for adventofcode.com - 2021 edition

aoc-2021 Warning Spoiler Alert! If you want to solve the aoc problems on your own, do not read any further. This repository contains solutions for the

Apr 26, 2022
A Rust-based Garry's Mod module for fetching environment variables.

gm_environ Using Environment Variables in Garry's Mod. Installation Download a copy of the module from the releases (or compile from source) Move the

Jan 4, 2022
Envful is a CLI tool that verifies the presence of environment variables
Envful is a CLI tool that verifies the presence of environment variables

Envful is a CLI tool that verifies the presence of environment variables. It looks inside your .env file and the host system. You can use it to run any process while ensuring all the variables are set.

May 23, 2022
Set Shell Environment Variables across multiple shells with a single configuration file.

Xshe – Cross-Shell Environment Vars xshe allows for setting Shell Environment Variables across multiple shells with a single TOML configuration file.

May 8, 2022
Manage lightweight VMs created from OCI images
Manage lightweight VMs created from OCI images

krunvm krunvm is a CLI-based utility for managing lightweight VMs created from OCI images, using libkrun and buildah. Features Minimal footprint Fast

May 14, 2022
The application that can be used for personal usage to manage jira from terminal.

Jira Terminal This application can be used for personal usage to manage jira from terminal. Installation This application can be used in multiple plat

May 23, 2022
Command-line program to manage PS battle logs. WIP.

psbattletools psbattletools is a command-line tool written in Rust for manipulating Pokémon Showdown battle logs. Installation psbattletools currently

Dec 10, 2021
Nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Troubleshooting on Linux Troublesh

May 24, 2022
procs makes it easy to find and manage system processes

procs procs makes it easy to find and manage system processes. Right now, the main usage is finding processes by the ports it is listening on, but mor

Feb 1, 2022
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

May 20, 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

Feb 16, 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'

Jan 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

May 22, 2022
🐢 Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands
🐢 Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands

Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines, via an Atuin server.

May 23, 2022
Save image from your clipboard 📋 as an image file directly from your command line! 🔥

Clpy ?? Save copied image from clipboard as an image file directly from your command line! Note It works only on windows as of now. I'll be adding sup

Aug 6, 2021
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Connect quickly to your services ?? FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config. Instal

May 20, 2022
create and test the style and formatting of text in your terminal applications
 create and test the style and formatting of text in your terminal applications

description: create and test the style and formatting of text in your terminal applications docs: https://docs.rs/termstyle termstyle is a library tha

Jul 3, 2021