Deleting versions of ruby

后端 未结 2 1639
予麋鹿
予麋鹿 2021-01-26 15:08

Trying to get a gem working so, following a SO suggestion, I deleted older versions of ruby I had as follows:

$ which -a ruby
/Users/snowcrash/.rvm/rubies/ruby-1         


        
相关标签:
2条回答
  • 2021-01-26 15:47

    I think you only deleted either a stub or a symbolic link. It would likely be pointing to the other ruby installed above, in the longer path.

    0 讨论(0)
  • 2021-01-26 15:47

    I think your RVM installation is confused because you tried to delete Ruby in an unsupported way.

    RVM manages your Rubies for you and it's pretty understandable that doing things outside of RVM to the Rubies inside it, will really mess it up. In other words, don't color outside the lines.

    As is, I'd blow away ~/.rvm using rm -rf ~/.rvm and reinstall RVM and let it reinstall the Rubies you want, then leave the internals alone until you really understand how RVM works and manages the installations.

    And, when you follow suggestions to delete all versions of something using a simple command like which ruby, be very skeptical. There is a lot more to a Ruby installation than just the interpreter. Also, some systems, like Mac OS, install Ruby for their own use, and deleting the Apple-installed system version can break apps. Reinstalling those versions is a real pain, so tip-toe carefully when removing files belonging to a language unless you really know what you're doing.

    0 讨论(0)
提交回复
热议问题