安装后,rvm(ruby 版本管理器)没有 root 访问权限 [英] Postinstall, rvm(ruby version manager) without root access

查看:91
本文介绍了安装后,rvm(ruby 版本管理器)没有 root 访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 RVM,(ruby 版本管理器")并且在源安装之后,我需要将 rvm 命令添加到我的个人资料中.

I am trying to use RVM, ("ruby version manager") and after the source installation, I need to add rvm command into my profile.

我在 $HOME/.profile 文件中添加了以下代码,但它似乎不起作用.

I added following code to the $HOME/.profile file but it does not seem to work.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

所以我只是在下面手动输入临时添加 rvm 命令,但它似乎不起作用.我收到如下重定向错误的缺少名称.

So I just manually typed below for temporary addition of rvm command, but it does not seem to work. I get Missing name for redirect error like below.

>>source ~/.rvm/scripts/rvm
Missing name for redirect.

我该如何解决这个问题?BTW,我没有root权限,我的linux是redhat系统.

How can I resolve this problem? BTW, I do not have root access, and my linux is a redhat system.

推荐答案

这是对 Bash 读取其启动文件.我认为您想使用 ~/.bashrc~/.bash_profile.

This is a description of how Bash reads its startup files. I think you want to use either ~/.bashrc or ~/.bash_profile.

将行添加到这些文件之一后,您需要打开一个新的终端窗口.键入 echo $PATH,您应该会在开头看到 RVM 的路径初始化.输入 which ruby​​,它应该指向 ~/.rvm 路径中的一个.输入 rvm list,它应该会显示其控制下的 Ruby.

Once you've added the line to one of those files you'll need to open a new terminal window. Type echo $PATH and you should see RVM's path initialization at the start of it. Type which ruby and it should point to one in your ~/.rvm path. Type rvm list and it should show the Rubies under its control.

另外,请务必定期运行 rvm get head 以安装最新版本的 rvm,因为作者经常更新它.

Also, be sure to run rvm get head regularly to install the most recent version of rvm as the author updates it often.

这篇关于安装后,rvm(ruby 版本管理器)没有 root 访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆