Can't get RVM to switch rubies

允我心安 提交于 2019-12-10 15:38:58

问题


How do I explicitly point my fish shell to RVM's version of rubies?

I'm using fish shell and I installed RVM. However, no matter what I do, RVM doesn't want to switch rubies.

rvm rubies

=* ruby-2.3.0 [ x86_64 ]

> ruby -v                                                             
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

> rvm use ruby-2.3.0
Using /Users/.../.rvm/gems/ruby-2.3.0

> ruby -v                                                             
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

my config.fish file contains: rvm default

What am i doing wrong here?

UPDATES:

> which ruby                                                                                                                                         
/usr/bin/ruby

which -a ruby                                                                                                                                      
/usr/bin/ruby

echo $PATH                                                                                                                                         
/usr/local/bin /usr/bin /bin /usr/sbin /sbin

It seems like the path might be wrong, but i'm not sure and not sure how to correct it.

EDIT 2:

Now I changed the path, but it still isn't working:

> echo $PATH                                                          
/Users/.../.rvm/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin

回答1:


Maybe it is a silly observation, but after installing from github:

curl -L --create-dirs -o ~/.config/fish/functions/rvm.fish https://raw.github.com/lunks/fish-nuggets/master/functions/rvm.fish

did you configure the rvm defaul like this?:

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


来源:https://stackoverflow.com/questions/44082425/cant-get-rvm-to-switch-rubies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!