开发者

What is the purpose of the RVM binary if it can be run as a function?

I've recently started using Ruby and was told to look in开发者_运维知识库to using RVM. I'm currently trying to understand how it operates but as far as I can tell from the website it can be run either as a binary or as a function in the shell by modifying .bash_profile.

What are the binaries for? I noticed they got installed to ~/bin, which felt sort of messy, and they did not seem to be invoked when using the rvm command. Are the binaries even needed when running RVM as a shell function?


It is normal and desirable for users of unix to put binaries in ~/bin (you would normally add that to your $PATH), so don't feel like it's messy to install stuff there.

That said, ~/bin/rvm is a script that will let you run rvm commands (like install), but is unable to edit your shell's environment (like all programs). Commands that need to edit the environment (like use), would not be possible without the rvm function. Not being super familiar with rvm, I am guessing the ~/bin/rvm exists for people that don't want to include the rvm stuff in all their shells. AFAICT, you don't need any of the stuff rvm puts in ~/bin if you are going to alter your ~/.bashrc as recommended.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜