RVM安装失败,没有修复似乎工作
我知道其他人有安装RVM的问题,但我已经看过他们的问题/答案,并没有帮助。我使用Ubuntu 11.10,和我在这里按照快速安装方向:https://rvm.beginrescueend.com/rvm/install/RVM安装失败,没有修复似乎工作
第一步工作得很好:
~$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Downloading RVM from wayneeseguin branch stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125 100 125 0 0 909 0 --:--:-- --:--:-- --:--:-- 1524
100 799k 100 799k 0 0 1059k 0 --:--:-- --:--:-- --:--:-- 1059k
Upgrading the RVM installation in /home/nsmith/.rvm/
RVM sourcing line found in: /home/nsmith/.bash_history.
Upgrade Notes:
* No new notes to display.
# RVM: Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.beginrescueend.com/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Screencast: http://screencasts.org/episodes/how-to-use-rvm
# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
Upgrade of RVM in /home/nsmith/.rvm/ is complete.
# nsmith,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne
可爱。第2步也运行良好,没有输出。步骤3返回:
The program 'rvm' is currently not installed. You can install it by typing:
sudo apt-get install ruby-rvm
从我发现了,这可能是因为我最初试图使用sudo的第一步,并拧一切。我很可能通过诱饵并通过sudo apt-get install ruby-rvm
进行安装,这显然已经过时或损坏。
寻找答案使我:
http://beginrescueend.com/support/troubleshooting/
我在哪里执行下节“如何彻底从我的系统清理掉RVM的所有痕迹,包括全系统列出的sh文件安装?”我也按照说明操作,并检查了.bashrc,.bash_profiles,.profiles等rvm提及并删除了它们。
我也试过了我在*问题中找到的答案“我如何在Ubuntu上卸载Ruby?”。也就是,sudo aptitude purge ruby
然后,因为我其实还没有红宝石,sudo aptitude purge ruby-rvm
。我也试过sudo apt-get purge ruby-rvm
最后,我已经尝试了这里@ mkoby.com的说明,标题为“完全移除-RVM”。这基本上是说删除.rvm *文件,并运行sudo groupdel rvm
我试过很多从我的系统中删除RVM,这样我可以运行一个干净的安装,没有sudo,最后得到的东西去。有没有人有建议?我真的很感激它。
我也在为此而努力。它给我带来的是外壳中的$PATH
变量。
我跟踪了几乎所有与试图获得rvm清洁机器相同的资源。每当我想尝试与非sudo的运行RVM安装,我会得到同样的消息,你得到:
"The program 'rvm' is currently not installed. You can install it by typing:
sudo apt-get install ruby-rvm"
此消息是不是一个真正的错误。它是在一个名为RVM文件的脚本,上面写着:
echo "The program 'rvm' is currently not installed. You can install it by typing:
sudo apt-get install ruby-rvm"
我希望我能记住这个文件的位置,但我不能。 (尝试使用$ which rvm
命令并确认您看到rvm
命令,并且它只是上面提到的脚本。)我知道您当前的bash $PATH
会将您带到此脚本中,而不是RVM真正安装的位置。这是获得确切错误信息的唯一可能方式。
如果您已经安装了RVM没有sudo
,它应该是在〜/ .rvm(你的home目录内的一个隐藏目录。)如果你的$PATH
正确设置了它要寻找RVM这个目录里面,它会找到它。如果我没有记错,我必须将/home/my_name/.rvm/
移动到我的$PATH
变量的开头,以使rvm
命令可以在那里找到rvm,但找不到上面提到的脚本文件。
希望这可以帮助你。
要修复它一次:
$ source ~/.profile
$ rvm
要始终修复它,因为gotqn说,你可以在你的〜/ .bash_profile中
$ echo ". .profile" >> ~/.bash_profile
你有RVM采购行的末尾添加它在不同的文件中。
RVM sourcing line found in: /home/nsmith/.bash_history.
它应该在.bash_profile或.bashrc文件中。确保这些文件被自动加载
要解决运行:
~/.rvm/bin/rvm get head --auto
你也可能需要设置一些设置,尤其是,这可能是重要的:https://rvm.beginrescueend.com/integration/gnome-terminal/
太棒了!这对我有效。它会自动删除与rvm有关的任何内容,然后重新添加所有内容,谢谢你的信息 – jamesc 2013-02-17 15:10:50
我写这个答案,因为没有已经给出了直接的答案,这使rvm能够在没有任何问题的情况下正常工作。科伦的答案有点像一个临时解决方案。
完成RVM的全新安装后,只需在您的~/.bash_profile
中添加一行。
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
创建.bash_profile
文件,如果一个不存在。该指令实际上是RVM安装手册的part,我们期望完成此安装。
我以前遇到同样的问题,之后它应该可以正常工作 - 假设您之前没有使用shell/bash设置(足够)。
此外,如果您想要这样的话,您可以将$HOME
更改为您的主目录的位置:/home/ur_username_here
,即使脚本应该正常工作。
之后,只需确保关闭该终端并再次打开。
通过使用rvm list
或类似的东西来测试RVM是否工作正常。它应该工作正常。
+ 1但是为了解决这个问题,sudo gedit〜/ .bash_profile在那里添加source〜/ .profile行。 – gotqn 2013-04-27 09:59:02