Releases: rbenv/rbenv
rbenv 1.3.2
What's Changed
Special shoutouts to
- @BiggerNoise for helping me debug rbenv init
- @Tobias-pwnr for reporting a bug with bash < 4.4
- @pnghai for the proposed fix #1605
Full Changelog: v1.3.1...v1.3.2
rbenv 1.3.1
What's Changed
- Add
/usr/etc/rbenv.dto hooks path by @tomschr in #1587 - Use
readarrayin bash v4+ to avoid rbenv init hanging by @mislav in #1604 - Add instructions for Fedora Linux installation by @nethad in #1583
- Skip BW01 and BW02 error messages during tests by @mikelolasagasti in #1600
- Bump mislav/bump-homebrew-formula-action from 3.1 to 3.2 by @dependabot in #1598
New Contributors
- @nethad made their first contribution in #1583
- @tomschr made their first contribution in #1587
- @mikelolasagasti made their first contribution in #1600
Full Changelog: v1.3.0...v1.3.1
rbenv 1.3.0
Hi, it's been a long time! π The theme for this release is user-friendliness: both the initial rbenv init setup and the documentation throughout the project should be clearer and easier to understand, especially for newcomers.
Feature Changes
-
The
rbenv initcommand now modifies shell initialization files instead of printing instructions by @mislav in #1568This solves one of the most common pitfalls rbenv users were experiencing: many did not understand that
rbenv initonly printed instructions intended for humans but did not change anything in their shell environment. Now,rbenv initactually modifies the environment, which seems to be what most users expected in the first place. -
Simplify resolving symlinks, remove native bash extension by @mislav in #1428
This solves a GPL license compliance issue where a GPL-licensed script was distributed with this project, which was not compatible with this project's license (MIT). #1395
-
Add man page for rbenv by @mislav in #1438
Preview the man page in HTML form here: https://rbenv.org/man/rbenv.1
Fixes
- Simplify
.ruby-versionfile read by @scop in #1393 - Ignore shell builtins and functions when looking up commands in PATH by @mislav in #1448
- Use the newer βcompsysβ completion system for zsh completions by @Farid-NL in #1569
- Ensure zsh user's prior shell options don't interfere with indexing into an array of arguments by @richiethomas in #1422
- rbenv shell: properly declare global variables for zsh by @mislav in #1566
- Support ksh versions by @kpschoedel in #1504
Documentation Improvements
- Massive README overhaul by @mislav in #1433
- Update code block in readme for rbenv-doctor script by @audreee in #1353
- Make bash commands copy-able by GitHub by @simonschaufi in #1360
- README: grammar fix by @dmerejkowsky in #1379
- Redirect Debian/Ubuntu users to install using git by @tommyjanna in #1388
- Fix link to Pow because the server is down by @uraitakahito in #1418
- Use absolute path in
rbenv initinstructions if needed by @mislav in #1434 - Consistent syntax in man page by @mislav in #1453
- Make the usage syntax for arbitrary args consistent by @mislav in #1447
- Improve disabling instruction by @ahangarha in #1468
version-filedocs update by @richiethomas in #1512- help: have
--usagealways print a usage line by @mislav in #1515 - Update alerts in README by @dipree in #1537
- Clarify help text of some commands by @mislav in #1567
- Update link to maintained version of Bats by @acook in #1544
- Removes redundant ruby-build from brew-install by @jasonkarns in #1575
Housekeeping
- Use
test -aPinstead ofwhich -ain test helper by @scop in #1359 - Add Shell linter - Differential-ShellCheck by @jamacku in #1419
- Followup to βSimplify resolving symlinksβ feature:
- Restore Rubygems warning for user-installed gems by @mislav in #1445
- Use
read -ato split output into an array by @mislav in #1450 rbenv version- test coverage for preferring local over global version file by @richiethomas in #1456- Update actions/checkout version to v3 by @ydah in #1461
- ci(lint): pin
differential-shellchecktov3tag by @jamacku in #1465 - Added dependabot update for GitHub Actions by @hsbt in #1476
- Bump mislav/bump-homebrew-formula-action from 1.4 to 2.2 by @dependabot in #1477
- Bump redhat-plumbers-in-action/differential-shellcheck from 3 to 4 by @dependabot in #1478
- Add spec to cover inclusion of etc/ sub-folders in plugins test by @richiethomas in #1492
- ci: trigger differential-shellcheck workflow on push by @jamacku in #1497
- Fix a dead link in a comment by @notEthan in #1505
- Bump actions/checkout from 3 to 4 by @dependabot in #1521
- Bump mislav/bump-homebrew-formula-action from 2.2 to 2.3 by @dependabot in #1526
- Bump mislav/bump-homebrew-formula-action from 2.3 to 3.0 by @dependabot in #1530
- Bump mislav/bump-homebrew-formula-action from 3.0 to 3.1 by @dependabot in #1531
- Bump redhat-plumbers-in-action/differential-shellcheck from 4 to 5 by @dependabot in #1533
- Move gem-rehash monkey patch by @benmelz in #1541
- Use bats-core instead of archived version by @hsbt in #1545
New Contributors
- @audreee made their first contribution in #1353
- @simonschaufi made their first contribution in #1360
- @dmerejkowsky made their first contribution in #1379
- @tommyjanna made their first contribution in #1388
- @uraitakahito made their first contribution in #1418
- @richiethomas made their first contribution in #1422
- @jamacku made their first contribution in #1419
- @ydah made their first contribution in #1461
- @ahangarha made their first contribution in #1468
- @hsbt made their first contribution in #1476
- @dependabot made their first contribution in #1477
- @notEthan made their first contribution in #1505
- @kpschoedel made their first contribution in #1504
- @dipree made their first contribution in #1537
- @benmelz made their first contribution in #1541
- @acook made their first contribution in #1544
- @Farid-NL made their first contribution in #1569
Full Changelog: v1.2.0...v1.3.0
rbenv 1.2.0
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 versionsoutput 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-versionfiles #1156 -
Avoid
type: write error: broken pipewarning #1195 -
Fix fish shell initialization #1220
-
Avoid unintentional globbing in bash completion #1253
-
Strip
-<suffix>when detecting the shell #1311 -
Supply
head -nflag explicitly #1332
rbenv 1.1.2
-
Fix
rehashmechanism for versions of bash that complain about clobbering/dev/null -
Enforce absolute
RBENV_DIRto avoid having to unsetCDPATH -
rbenv-version-file: ensure that the version file is a file -
rbenv init -: fix output to work without args andset -u -
rbenv shell: better error message when shell integration wasn't enabled -
Enable freezing rbenv version via
rbenv version-name > .ruby-versionin the shell -
rbenv-which: avoid changing PATH unless necessary -
rbenv-prefix: do not silence rbenv-which errors for system version
rbenv 1.1.1
- Fix setting environment variable in fish shell
- Rename
OLD_RBENV_VERSIONtoRBENV_*convention
rbenv 1.1.0
Backwards incompatible:
- Remove deprecated
ruby-local-execexecutable - Remove support for
.rbenv-versionlegacy version file - Remove support for
default,globallegacy global version files
Features:
- Add support for
rbenv shell -style of invocation that restores previous version
Housekeeping:
- Adopt Contributor Covenant 1.4
- Replace
.withsourcefor fish shell - Unset CDPATH if it's set by the user
- Fix
rbenv <cmd> --helpforsh-*commands - Expand literal tilde in PATH
rbenv 1.0.0
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:
- Having its
shims/directory prepended to PATH environment variable; - Reading a
.ruby-versionfile 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 π
- Speed up rbenv with dynamically loaded
realpathC extension - Speed up
rbenv rehashwhen there are many Ruby versions with similar sets of executables - Improve performance of
rbenv-whichfor "system" version - Avoid
rbenv-execcalling out torbenv-version-nametwice
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 srcNew features π
- New plugin hooks
version-nameandversion-originenable plugin authors to hook into version selection logic. rbenv versions --skip-aliases --barewill only list versions that are not aliases (symlinks) for other versions.rbenv version-file <dir>finds a.ruby-versionfile in the target directory or any of its parent directories.rbenv initnow recognizes and supports fish shell syntax. πrbenv --debug <command>is a shortcut for enabling RBENV_DEBUG.
Shell integration π
- Fix
rbenv()shell function in ksh and dash - Ubuntu fix: use
sourceinstead 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 ofsh-*commands
General enhancements β¨
rbenv localnow respects.ruby-versionfile in parent directories as wellrbenv versionsnow emits a warning when no Ruby versions were found- Consistently support
rbenv <command> --helpas alternative torbenv help <command> - Improve parsing of git revision in
rbenv --versionwhen rbenv was installed from git - Export PS4 when RBENV_DEBUG is set for more informative debug output
Bug fixes πͺ²
- Fix incorrect formatting of
rbenv-helpoutput under MAWK (Ubuntu) - Prefer
gawkoverawkif both are available - Fix resolving symlinks in
rbenv-hooks - Fix iterating through paths that have spaces in them
- Fix
rbenv rehashwhen paths have spaces in them - More useful error message when rehash fails on a non-writable directory
- Make
rbenv-execfail for invalid Ruby version - Bail out early if
readlinkis not available - Properly resolve symlinks when listing hook scripts
- Better error message for
rbenv prefix system - Fix reading
.ruby-versionon platforms that don't support process substitution - Remove carriage return characters in
.ruby-versionfiles - Fixes rbenv on OpenBSD and other systems that don't support
head -c - Guard against exported
CDPATH - Ensure that
IFSis reset to its original value within hook scripts
rbenv 0.4.0
New features
- rbenv now prefers
.ruby-versionfiles to.rbenv-versionfiles
for specifying local application-specific versions. The
.ruby-versionfile has the same format as.rbenv-versionbut is
compatible with other Ruby version
managers. - Deprecated
ruby-local-execand moved its functionality into the
standardrubyshim. 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 helpso 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 --versionfor printing the current version of rbenv. - Added
/usr/lib/rbenv/hooksto the plugin hook search path.
Other changes and bug fixes
- Sped up
rbenv initby avoiding rbenv reinitialization and by
using a simpler indexing approach. - Updated installation instructions for Zsh and Ubuntu users.
- Fixed
rbenv whichandrbenv prefixwith system Ruby versions. - Changed
rbenv execto avoid prepending the system Ruby location to
$PATHto fix issues running system Ruby commands that invoke other
commands. - Changed
rbenv rehashto ensure it exits with a 0 status code under
normal operation, and to ensure outdated shims are removed first
when rehashing. - Modified
rbenv rehashto runhash -rafterwards, 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 versionsoutput to includesystem, if
present. - Improved documentation for installing and uninstalling Ruby
versions. - Fixed
rbenv versionsnot to display a warning if the currently
specified version doesn't exist. - Fixed an instance of local variable leakage in the
rbenvshell
function wrapper. - Changed
rbenv shellto ensure it exits with a non-zero status on
failure. - Fixed
rbenv whichto account for path entries with spaces. - Changed
rbenv initto accept option arguments in any order.
rbenv 0.3.0
- Added an
rbenv rootcommand 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
readlinkfor paths with spaces. - Changed Zsh initialization code to install completion hooks only for
interactive shells. - Added preliminary support for ksh.
rbenv rehashcreates 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-defaultandset-localcommands. - Added a
--no-rehashoption torbenv initfor skipping the
automatic rehash when opening a new shell.