linux 中的 ruby:永久“源 .rvm/scripts/rvm"? [英] ruby in linux: permanently "source .rvm/scripts/rvm"?
问题描述
我是 Ruby on Rails 的新手,刚刚按照我发现的说明在 Ubuntu Linux 中进行了设置 这里.具体来说,
I'm new to Ruby on Rails and have just set it up in Ubuntu Linux following instructions I found here. Specifically,
作为 s.m.说,我卸载了所有东西,然后我以普通用户身份打开另一个终端会话并运行:
As s.m. said, I uninstalled everything, then I opened another terminal session as a normal user and run:
bash -s 稳定 <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)然后我运行 source/home/my-desktop-username/.rvm/scripts/rvm 作为普通用户 NOT ROOT
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) then i run source /home/my-desktop-username/.rvm/scripts/rvm as a normal user NOT ROOT
然后我以普通用户的身份运行 rvm 要求.然后我复制需求并关闭会话,打开一个根会话并使用 sudo 安装需求
then i run rvm requirements as a normal user. Then I copy the requirements and close the session, open a root session and install the requirements using sudo
然后我关闭会话并打开一个普通用户会话并运行 rvm install ruby-1.9.3-p125 如果您以 root 身份运行此命令,它会说未安装 rvm 并建议您使用 sudo 安装它apt-get install rvm 不要那样做!
Then I close the session and open a normal user session and run rvm install ruby-1.9.3-p125 if you run this command as root, it will say that rvm is not installed and will suggest that you install it using sudo apt-get install rvm Don't do that!
所以基本上我有两个问题,我遵循的教程没有说我应该运行
So basically I had two problems, the tutorials that i followed didn't say that i should run
source/home/my-desktop-username/.rvm/scripts/rvm 并没有说我不应该以 root 身份运行 rvm,s.m 告诉我的.感谢大家,尤其是s.m
source /home/my-desktop-username/.rvm/scripts/rvm and didn't say that I should not run rvm as root, s.m told me that. Thanks to everyone, especially to s.m
效果很好,但我必须记住
That works well, but I will have to remember to
源.rvm/scripts/rvm
source .rvm/scripts/rvm
每次我打开一个终端来使用 Ruby on Rails.
every time I open a terminal to work with Ruby on Rails.
有没有办法永久告诉 Ubuntu 在 .rvm 中查找所有 Ruby 内容?
Is there a way to permanently tell Ubuntu to look in .rvm for all the Ruby stuff?
推荐答案
您需要添加您的
source .rvm/scripts/rvm
进入你的$HOME/.bashrc
文件;阅读高级 bash 脚本指南了解更多信息.
into your $HOME/.bashrc
file; read the advanced bash scripting guide for more.
这篇关于linux 中的 ruby:永久“源 .rvm/scripts/rvm"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!