Need help with rbenv-aliases?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

tpope
125 Stars 17 Forks MIT License 42 Commits 2 Opened issues

Description

Create aliases for rbenv Ruby versions

Services available

!
?

Need anything else?

Contributors list

# 11,179
hubot
Ember
Bash
express...
21 commits
# 204,528
Ruby
coveral...
Shell
CSS
5 commits
# 31,241
Perl
Haskell
vim-plu...
Vim
3 commits
# 47,441
opal
imagema...
delegat...
omniaut...
1 commit
# 244,793
Shell
Rails
HTML
CSS
1 commit

Aliases for rbenv Ruby versions

Invoke

rbenv alias  
to make a symbolic link from
 to
 in the rbenv versions directory, effectively creating an
alias.  The cool part is that if you pass in a point release as the name, you
can give 
--auto
to link to the latest installed patch level. For example,
rbenv alias 1.8.7 --auto
will automatically create an alias from
1.8.7
to
1.8.7-p371
(or whatever the most recent version you have installed is).

Plus, if you're using ruby-build,

rbenv install A.B.C-pXXX
automatically invokes
rbenv alias A.B.C --auto
, so you'll always have up to date aliases for point releases.

Whether it's a good idea to use these aliases in a

.ruby-version
file, I cannot say. I created this plugin to find out. If your only concern is having to reinstall gems every time you install a new patch release, check out rbenv-communal-gems.

Installation

mkdir -p "$(rbenv root)/plugins"
git clone git://github.com/tpope/rbenv-aliases.git \
  "$(rbenv root)/plugins/rbenv-aliases"
rbenv alias --auto

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.