Ruby: RVM Install Error “Could not source…”

◇◆丶佛笑我妖孽 提交于 2019-12-06 05:30:04

问题


A reinstall of RVM produced the following errors when done:

WARNING:
          Could not source '/Users/developer/.rvm/scripts/base' as file does not exist.
          RVM will likely not work as expected.
WARNING:
          Could not source '/Users/developer/.rvm/scripts/version' as file does not exist.
          RVM will likely not work as expected.
WARNING:
          Could not source '/Users/developer/.rvm/scripts/selector' as file does not exist.
          RVM will likely not work as expected.
WARNING:
          Could not source '/Users/developer/.rvm/scripts/cd' as file does not exist.
          RVM will likely not work as expected.
WARNING:
          Could not source '/Users/developer/.rvm/scripts/cli' as file does not exist.
          RVM will likely not work as expected.
WARNING:
          Could not source '/Users/developer/.rvm/scripts/override_gem' as file does not exist.
          RVM will likely not work as expected.
cat: /Users/developer/.rvm/VERSION: No such file or directory
/Users/developer/.rvm/src/rvm/scripts/rvm: line 133: __rvm_conditionally_add_bin_path: command not found

I reinstalled after I wrestled with trying to get RVM to work with Textmate and RVM behavior became strange (reporting it didn't have gemsets it would list) so I ran:

rvm implode

... and then manually removed the executable. Then I ran the install again by scrupulously following the single user instructions from the home site.

After I spotted the errors, I investigated the paths and found that many files in ~/.rvm/scripts/ and ~/.rvm/src/rvm/scripts/ which obviously should be executable did not have execute permissions.

RVM would not run at all so I set the executable bit on all the files in the two directories and that seems to have fixed things. (So far at least.)

Googling, it seems that other people have hit this problem but there seems to be no explanation or resolution. I would like to find out if this is a known issue and whether I should reinstall yet again.

I'm running rvm 1.6.9 on MacOS X 10.6.7


回答1:


they are warnings, not errors. I've got similar ones on my ubuntu linux box (but not on another, with same RVM version). so, it's not strctly related to OSX.

your RVM installation should work anyway.




回答2:


Yep. If you have installed system-wide it is definitely looking for both the system-wide configuration... and some hard-coded user scripts. Which is weird.

quick fix: ln -nfs /usr/local/rvm /Users/developer/.rvm




回答3:


it looks like all you need is to create that missing file.

in your terminal type:

touch /Users/developer/.rvm/scripts/version

touch /Users/developer/.rvm/scripts/base



来源:https://stackoverflow.com/questions/6038364/ruby-rvm-install-error-could-not-source

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