Alex Alex - 5 months ago 32
Ruby Question

How to make fish shell use an rvm ruby by default

I'm using fish shell 2.10 on Mac OS X 10.9.1. I would like to use a Ruby that I have installed using RVM as the default in my terminals, however I can't seem to make this work.

I've tried

rvm use 2.1.0 --default
but upon opening a new terminal I still get the following:

> which ruby

Running the
command causes the ruby to be loaded:

> which ruby
> rvm
> which ruby

But it's annoying to have to do this every time I open a new terminal.


Firstly install rvm fish functions from Just run this in any shell:

curl -L --create-dirs -o ~/.config/fish/functions/

You should now be able to use rvm command in fish. (Reopen terminal)

As for now the the above functions don't work for me completely :)

Anyway if you add the below to config file you should be ok:

echo 'rvm default' >> ~/.config/fish/

You should now be able to use ruby related binaries and gems. (Reopen terminal)