How to get rid of RVM notice

2k Views Asked by At

Is there a way to get rid of the warning, when I traverse into a folder having a .rvmrc file.

====================================================================================

= 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
4

There are 4 best solutions below

2
On BEST ANSWER

According to the documentation:

To turn off the project specific rvmrc functionality in your $HOME/.rvmrc set:
rvm_project_rvmrc=0

I don't have a RVM instance to try it out, but I guess that's what you are looking for.

I'd also suggest to use rbenv instead of RVM, for the following reasons.

0
On

If RVM has been installed with sudo, you'll have to cd to the directory as root.

If you trust the .rvmrc or .ruby-env as root, the notice shouldn't come back.

0
On

There is a bug right now in RVM that keeps it asking you trusting .rvmrc.

Solution is simple - use .ruby-version instead:

1.9.3

or

1.9.3@gemset

Gemset will be created automatically for you.

.ruby-version is only for Ruby versions switching. If you need some scripting when switching Ruby, you still need .rvmrc.

0
On

To switch from .rvmrc to .ruby-version + .ruby-gemset

rvm rvmrc to .ruby-version