当我遍历到具有.rvmrc
文件的文件夹时,有没有办法摆脱警告。
====================================================================================
= NOTICE =
====================================================================================
= RVM has encountered a new or modified .rvmrc file in the current directory =
= This is a shell script and therefore may contain any shell commands. =
= =
= Examine the contents of this file carefully to be sure the contents are =
= safe before trusting it! ( Choose v[iew] below to view the contents ) =
====================================================================================
Do you wish to trust this .rvmrc file? (/home/sam/myrailsapp/.rvmrc)
y[es], n[o], v[iew], c[ancel]> y
答案 0 :(得分:1)
According to the documentation:
To turn off the project specific rvmrc functionality in your $HOME/.rvmrc set:
rvm_project_rvmrc=0
我没有RVM实例可以尝试,但我想这就是你要找的。 p>
我还建议rbenv使用the following reasons代替RVM。
答案 1 :(得分:1)
现在RVM中有一个bug让它让你信任.rvmrc
。
解决方案很简单 - 改为使用.ruby-version
:
1.9.3
或
1.9.3@gemset
将自动为您创建Gemset。
.ruby-version
仅适用于Ruby版本切换。如果在切换Ruby时需要一些脚本,则仍需要.rvmrc
。
答案 2 :(得分:1)
从.rvmrc切换到.ruby-version + .ruby-gemset
rvm rvmrc to .ruby-version
答案 3 :(得分:0)
如果已经使用sudo安装了RVM,则必须以root身份cd
到目录。
如果您信任.rvmrc
或.ruby-env
为root,则通知不应该回来。