我正在尝试安装rvm
我有以下命令
rvm get stable
rvm requirements
rvm要求之后的错误
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p392/bin' is not at first place,
通过快速的互联网搜索,我做了以下
echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
现在我认为问题是我在bin文件夹中安装了多个ruby,但是我不知道如何修复它,快速的互联网搜索引导我到这个
https://www.ruby-forum.com/topic/4417119
建议我编辑我的.bash_profile
我当前的.bash_profile看起来像这样
##
# Your previous /Users/secret/.bash_profile file was backed up as /Users/secret/.bash_profile.macports-saved_2013-08-19_at_17:35:01
##
#MacPorts Installer addition on 2013-08-19_at_17:35:01: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
##
# Your previous /Users/secret/.bash_profile file was backed up as /Users/secret/.bash_profile.macports-saved_2013-08-19_at_17:42:44
##
# MacPorts Installer addition on 2013-08-19_at_17:42:44: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
然而,我对编辑.bash_profile完全不熟悉,并且犹豫是否也做同样的事情,任何人都可以解释下面做了什么,以及它将如何解决我的情况?
export
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/usr/local/bin:/opt/sm/pkg/active/sbina
由于
编辑:
我试过了
export
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/usr/local/bin:/opt/sm/pkg/active/sbina
正如斯蒂芬推荐的那样,虽然问题仍然存在
编辑2:
我也试过
rvm --debug get head
返回
升级说明:
* WARNING: you have 'rvm_configure_env' in /etc/rvmrc, run the following to fix:
sudo sed -i'' -e "/rvm_configure_env=.*\/opt\/sm/d" /etc/rvmrc
rvm autolibs smf
我尝试了两个命令,我仍然得到了
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p392/bin' is not at first place,
何时
rvm requirements
编辑:
尝试
rvm install ruby-head