linux中的ruby:永久“源.rvm / scripts / rvm”?

时间:2022-12-06 14:06:32

I'm new to Ruby on Rails and have just set it up in Ubuntu Linux following instructions I found here. Specifically,

我是Ruby on Rails的新手,刚刚按照我在这里找到的说明在Ubuntu Linux中进行了设置。特别,

As s.m. said, I uninstalled everything, then I opened another terminal session as a normal user and run:

作为上午说,我卸载了所有内容,然后我作为普通用户打开了另一个终端会话并运行:

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

bash -s stable <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)然后我运行源/home/my-desktop-username/.rvm/scripts/ rvm作为普通用户NOT ROOT

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要求。然后我复制需求并关闭会话,打开根会话并使用sudo安装需求

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!

然后我关闭会话并打开一个正常的用户会话并运行rvm install ruby​​-1.9.3-p125如果你以root身份运行这个命令,它会说rvm没有安装,并建议你使用sudo apt-get安装它安装rvm不要那样做!

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 and didn't say that I should not run rvm as root, s.m told me that. Thanks to everyone, especially to s.m

来源/home/my-desktop-username/.rvm/scripts/rvm并没有说我不应该以root身份运行rvm,s.m告诉我。感谢大家,尤其是上午

That works well, but I will have to remember to

这很好,但我必须记住

source .rvm/scripts/rvm

every time I open a terminal to work with Ruby on Rails.

每次我打开一个终端来使用Ruby on Rails。

Is there a way to permanently tell Ubuntu to look in .rvm for all the Ruby stuff?

有没有办法永久告诉Ubuntu查看所有Ruby内容的.rvm?

1 个解决方案

#1


19  

You need to add your

你需要添加你的

  source .rvm/scripts/rvm

into your $HOME/.bashrc file; read the advanced bash scripting guide for more.

进入你的$ HOME / .bashrc文件;阅读高级bash脚本指南了解更多信息。

#1


19  

You need to add your

你需要添加你的

  source .rvm/scripts/rvm

into your $HOME/.bashrc file; read the advanced bash scripting guide for more.

进入你的$ HOME / .bashrc文件;阅读高级bash脚本指南了解更多信息。