How do I upgrade RVM when the official way doesn't work?

拟墨画扇 提交于 2019-12-01 08:30:51

问题


Namaste!

Wanting to check out the shiny new Rails 5.0, I bumped into an error saying I need to upgrade my Ruby version to a minimum 2.0.0 (my current version being 2.1.3). I use RVM to manage Rubies on my OSX, so I tried the good ol'

rvm install ruby --latest

...only to be told

Already installed ruby-2.1.3.

I ran

rvm known list

...and indeed, the latest version of Ruby listed was the one I already have, i.e, 2.1.3. Next, I checked my RVM version and found it to be 1.25.31, while the RVM blog states 1.27.x was recently released. So I decided maybe this is the reason the known list doesn't show newer Ruby versions and used the documented steps of upgrading RVM from their site. After reloading, I still see the same version of RVM and the same list of available Ruby versions. I tried restarting Terminal too. What do I do now?


回答1:


Install RVM from scratch

1) First remove the current version, see: https://stackoverflow.com/a/3558763/1076207

# use sudo at your own discretion
rvm implode --force
gem uninstall rvm
rm -rf ~/.rvm

# open file
vim ~/.bash_profile
# remove lines:
# [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# close file

2) Follow the directions on the RVM install page: https://rvm.io/rvm/install



来源:https://stackoverflow.com/questions/38157242/how-do-i-upgrade-rvm-when-the-official-way-doesnt-work

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