A simple ruby version manager for fish.
git clone git://github.com/terlar/fry.git
cd fry
make install
Add the following to the ~/.config/fish/config.fish
file:
. /usr/local/share/fry/fry.fish
fry
is also available for Arch Linux in the AUR as the package fry or fry-git.
To install, use your favorite AUR helper (yoaurt
, aura
, etc.).
$ yoaurt -S fry
By default fry
will look for rubies in ~/.rubies
. This can be configured as you like.
If you have ruby-build installed, fry
provides a wrapper
with autocompletion and building to the correct destination.
To install rubies this way, run the following command:
fry install 1.9.3-p392
To see which configuration options are available and your current configuration,
you can execute the command fry config
.
This option determines where fry
looks for rubies.
# To see the path
fry config path
# To set the path
fry config path /opt/rubies
If you want fry
to look for a .ruby-version file and
automatically switch ruby on directory change then you can enable auto-switching. This is off by default.
# To see the auto-switch status
fry config auto
# To enable auto-switch
fry config auto on
# To disable auto-switch
fry config auto off
When you have a .ruby-version file in your home directory this will be used by pow as default.
If you want it to pickup the custom ruby-version per project you have to create a .powenv
inside
the project folder with the following content:
export PATH="$(fish -c 'fry current --path'):$PATH"
If you wish to set a default Ruby, simply call fry
in ~/.config/fish/config.fish
:
fry ruby-1.9
If you have enabled auto-switching, simply create a .ruby-version
file in your home directory:
echo 'ruby-1.9' > ~/.ruby-version
List available rubies:
fry
system
* 1.9.3-p392
2.0.0-p0
jruby-1.7.3
Install ruby:
fry install <tab>
fry install 2.0.0-p247
fry use 2.0.0-p247
Get help:
fry help