• Stars
    star
    62
  • Rank 490,914 (Top 10 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple ruby version manager for fish

fry Build Status

A simple ruby version manager for fish.

Installation

User

git clone https://github.com/terlar/fry.git
cd fry
make user-install
fisher terlar/fry
plug terlar/fry

System-wide

git clone https://github.com/terlar/fry.git
cd fry
make install

Arch Linux

fry is also available for Arch Linux in the AUR as the package fry or fry-git. To install, use your favorite AUR helper (yaourt, aura, etc.).

yaourt -S fry

OS X

fry is also available for OS X in the homebrew as the formula fry via tap.

brew tap igas/fry
brew install fry

If you want to install master version, add --HEAD to install command.

Rubies

By default fry will look for rubies in ~/.rubies. This can be configured as you like.

Install (with ruby-install or ruby-build)

If you have ruby-install or ruby-build installed, fry provides a wrapper with auto-completion and building to the correct destination. To install rubies this way, run the following command:

# To see available rubies
fry install
# To install a specific ruby version
fry install jruby-1.7.9

Configuration

To see which configuration options are available and your current configuration, you can execute the command fry config.

Path (Rubies)

This option determines where fry looks for rubies.

# To see the path
fry config path
# To set the path
fry config path /opt/rubies

Prepend path

This option determines if your ruby path should be prepended or not. However it will never be at the end of your PATH since we are using fish_user_paths which is prepended to PATH. However if you have specified other paths inside your fish_user_paths then those will have higher priority. To change this behavior you can toggle this. The default behavior is append.

# To prepend to the fish_user_paths
fry config prepend on
# To append to the fish_user_paths
fry config prepend off

Auto-Switch

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

Prax/Pow

If you are using prax or pow you can make it utilize the auto-switching capability.

When you have a .ruby-version file in your home directory this will be used used by default. If you want it to pickup the custom ruby-version per project you have to create a .praxconfig in your home directory or for pow, you need to create a .powenv inside every project folder.

Run the following commands:

# If you have auto-switch, it will use whatever is specified in your .ruby-version
fry env > ~/.praxconfig
# Specify a specific ruby to run
fry env rbx-2.2.6 > ~/ruby_project/.praxenv

Installer

If you want to select which installer fry should use, you can do it through this option. There are currently support for ruby-install and ruby-build. But you could easily define your own wrapper if you use some other tool.

# To list available installer wrappers
fry installers
# To see the installer used
fry config installer
# To set the desired installer
fry config installer ruby-install

Default Ruby

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

Examples

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

More Repositories

1

nix-config

Configuration for NixOS and user home (dot files).
Nix
96
star
2

emacs-config

GNU Emacs configuration
Emacs Lisp
52
star
3

dotfiles

Well-structured and constantly improving dotfile-solution. Forking and feedback is welcome!
Shell
48
star
4

docker-spotify-pulseaudio

Run Spotify inside an isolated Docker container
Shell
46
star
5

indent-info.el

Show indentation information in status bar
Emacs Lisp
21
star
6

fish-tank

Observe the behavior of your species in the tank - simple test framework for fish
Shell
15
star
7

docker-skype-pulseaudio

Run Skype inside an isolated Docker container
Shell
8
star
8

formatter-number

Number formatter
Ruby
4
star
9

mux

tmux session wrapper
Shell
3
star
10

nix-service-monorepo

Service monorepo managed with Nix (Playground)
Nix
3
star
11

base16-vim-powerline

Base16 for vim-powerline
Vim Script
3
star
12

dev-flake

Nix flake to support the pattern of using a separate development flake
Nix
2
star
13

archbox

Puppetized archbox
Puppet
2
star
14

docker-nix

Unofficial Docker images with Nix
Dockerfile
2
star
15

nix-terraform

Nix flake with terraform lib functions and up to date provider packages
Nix
2
star
16

curio

Enumerable maps for Ruby
Ruby
2
star
17

sam-playground

Playground for SAM development
Shell
2
star
18

fish-farm

Farming your projects with fish and tmux
Shell
2
star
19

exercism-workspace

Exercism workspace and solutions
Shell
1
star
20

fish-plug

๐ŸŸ A simple plugin manager for fish
Shell
1
star
21

vim-ref-fish

A vim-ref source for fish
Vim Script
1
star
22

vimfiles

Well-structured and constantly improving vimfile-solution. Forking and feedback is welcome!
Vim Script
1
star
23

menu

A menu loop used to create custom menus for command line tools
Shell
1
star
24

zshfiles

Well-structured zshfile-solution. Forking and feedback is welcome!
Shell
1
star
25

box

Workstation automation experiments
SaltStack
1
star
26

pkgbuilds

AUR Package Repositories
Shell
1
star
27

formatter-date

Format Time/DateTime with time zone offset
Ruby
1
star