All Versions
Latest Version
Avg Release Cycle
40 days
Latest Release
2993 days ago

Changelog History
Page 1

  • v0.3.9 Changes

    November 23, 2014


    • Stop searching RUBIES if an exact match is found. (@havenwood)

    • ๐Ÿ›  Fixed a bug where /.ruby-version was being ignored. (@havenwood)

    ๐Ÿ’Ž chruby-exec

    • Ensure that all parameters are properly shell-escaped. (@havenwood)



    • ๐Ÿ–จ Print RUBYLIB, RUBYOPT, RUBYPATH and RUBYSHELL env variables.
    • ๐Ÿ’Ž Include chruby-exec in the versions section.
    • Fall back to -V if --version did not work.
  • v0.3.8 Changes

    December 04, 2013


    • โœ‚ Remove trailing slashes from ruby directories when iterating over RUBIES. (@halostatue)
    • Ensure all temporary variables are local or unset.

    • ๐Ÿ’Ž Ensure that chruby_auto can read .ruby-version files that do not end with a new-line. (@hosiawak)


    • ๐Ÿ’Ž Install ruby-install 0.3.3.


    • Print trap -p, $preexec_functions and $precmd_functions.
    • ๐Ÿ–จ Print env variables even when they are empty.
  • v0.3.7 Changes

    August 18, 2013
    • ๐Ÿ’… Multiple style changes and optimizations. (@zendeavor)
    • Safely glob the contents of /opt/rubies and ~/.rubies. This prevents nullglob errors under zsh and .rbx directories from being added to RUBIES.
    • ๐Ÿ’Ž Unset GEM_PATH in chruby_reset if it has become empty. Allows the RubyGems to use the default GEM_PATH.
    • Safely quote RUBIES[@] to prevent implicit word-splitting when listing RUBIES.
    • ๐Ÿ’Ž Map -V to --version in chruby. (@havenwood)
    • โž• Added benchmarks.

    • Unset RUBY_AUTO_VERSION when loaded. Forces sub-shells to re-detect any .ruby-version file. (@KevinSjoberg)
    • No longer export RUBY_AUTO_VERSION. Allows new windows in tmux to detect the .ruby-version file.
    • Set RUBY_AUTO_VERSION even if .ruby-version contains an unknown Ruby. Prevents chruby from printing errors after every command.
    • ๐Ÿ”– Fixed a typo where RUBY_VERSION_FILE was still being used. (@KevinSjoberg)

    ๐Ÿ’Ž chruby-exec

    • If stdin is a TTY, then spawn an interactive shell.
  • v0.3.6 Changes

    June 24, 2013
    • ๐Ÿ’Ž chruby_use no longer echos the selected Ruby.

    ๐Ÿ’Ž chruby-exec

    • Now runs under bash.
    • ๐Ÿ’Ž Load for CHRUBY_VERSION.

    • ๐Ÿ’Ž Record and compare the contents of .ruby-version files in order to detect modifications, such as when switching between branches.
  • v0.3.5 Changes

    May 29, 2013
    • โž• Added a RPM spec.
    • Respect PREFIX when auto-detecting /opt/rubies/*.
    • ๐Ÿ’Ž Do not set GEM_ROOT if rubygems is not installed (Charlie Somerville).
    • ๐Ÿ’Ž chruby_use now echos the select ruby and the version, only if the shell is in interactive mode (Brian D. Burns).
    • ๐Ÿšš chruby_reset no longer accidentally removes /bin if GEM_HOME or GEM_ROOT are empty (David Grayson).
    • ๐Ÿ’Ž chruby now selects the last lexical match for the given ruby.

    • Ensure that auto-switching works in non-interactive mode:
      • zsh: use preexec_functions which runs in both interactive and non-interactive sessions.
      • bash: use trap DEBUG which runs before every command, in both interactive and non-interactive mode. PROMPT_COMMAND only runs in interactive mode.
    • ๐Ÿ›  Fixed a serious design flaw, where chruby_auto passed the contents of .ruby-version as multiple arguments to the chruby function. Originally, this allowed for .ruby-version files to specify additional RUBYOPT options (ex: jruby --1.8). However, an attacker could craft a malicious .ruby-version file that would require arbitrary code (ex: 1.9.3 -r./evil.rb). The ./evil.rb file would then be required when ruby is invoked by chruby_use in order to determine RUBY_ENGINE, RUBY_VERSION, GEM_ROOT.

    In order to prevent the abuse of this feature, chruby_auto now passes the entire contents of .ruby-version as a first and only argument to the chruby function.

    If you have enabled, it is recommended that you upgrade. If you cannot upgrade, consider disabling If you want to scan your entire system for malicious .ruby-version files:

        find / -name .ruby-version 2>/dev/null | xargs -i{} grep -H " " {}

    Thanks to David Grayson for reporting this flaw.


    • Do not assume bash is installed at /bin/bash (Shannon Skipper).
  • v0.3.4 Changes

    February 28, 2013
    • ๐Ÿ’Ž Prepend the new gem paths to GEM_PATH in chruby_use, instead of overriding the variable. This allows users to add common gem paths to GEM_PATH in ~/.bashrc.
    • ๐Ÿšš Only remove the gem paths used by the Ruby in chruby_reset.

    • Detect when PROMPT_COMMAND=" " before checking if PROMPT_COMMAND is an empty String. This appears to only happen on OSX Mountain Lion.


    • ๐Ÿ’Ž Include CHRUBY_VERSION in the output.
  • v0.3.3 Changes

    February 19, 2013
    • โž• Added -v --version options to chruby and chruby-exec.
    • โž• Added scripts/ for collecting environment information for bug reports.
    • ๐ŸŽ‰ Initialize RUBIES to () to avoid double-loading
    • ๐Ÿ’Ž Invoke ruby using the absolute path to avoid shell aliases. This fixes a bug caused by [ohmyzsh] aliases.

    • ๐Ÿ”– Unset RUBY_VERSION_FILE on initial load for [tmux].
    • โœ‚ Remove trailing ; and whitespace from PROMPT_COMMAND before appending ; chruby_auto.


    • โฌ†๏ธ Bump MRI version to 1.9.3-p385.
    • ๐Ÿ‘‰ Use \x1b instead of \e for OSX.
  • v0.3.2 Changes

    January 16, 2013
    • Prevent from being loaded more than once.
    • Recommend using ~/.bash_profile and ~/.zprofile.
    • ๐Ÿ‘‰ Use cp and mkdir instead of install in the Makefile.

    ๐Ÿ’Ž chruby-exec

    • โš™ Run under [bash], to avoid the [dash] shell.
    • ๐Ÿ”ง Invoke $SHELL with the -i option, so [zsh] will load shell configuration.


    • ๐Ÿ’Ž Install [JRuby] 1.7.2.
    • ๐Ÿ”ง Use special ./configure options for [homebrew].
    • Also install openssl and readline via homebrew.
  • v0.3.1 Changes

    December 29, 2012
    • ๐Ÿ›  Fixed the auto-detection of ~/.rubies/*.
    • ๐Ÿ’Ž Check if bin/ruby exists and is executable before switching to a Ruby.
    • Prevent export="" from accidentally being set under [zsh].
    • Prevent script/ from exiting if a brew install fails because all packages are already installed.
    • โšก๏ธ Updated the example /etc/profile.d/ to only load under [bash] and [zsh].
  • v0.3.0 Changes

    December 21, 2012
    • โž• Added the chruby-exec utility for use in crontab or with Continuous Integration (CI).
    • โž• Added support for auto-detecting Rubies installed into /opt/rubies/ or ~/.rubies/.
    • โž• Added share/chruby/, which provides support for auto-switching to Rubies specified in the .ruby-version file.
    • โœ‚ Removed the "short circuit" check in chruby_use, to allow forcibly switching to the current Ruby, in case PATH or GEM_PATH become corrupted.