Is it possible to skip .rvmrc confirmation?

Posted by Viacheslav Molokov on Server Fault See other posts from Server Fault or by Viacheslav Molokov
Published on 2011-01-27T08:54:40Z Indexed on 2012/12/08 5:10 UTC
Read the original article Hit count: 489

Filed under:
|
|

We are using RVM for managing Ruby installations and environments.

Usually we are using this .rvmrc script:

#!/bin/bash
if [ ! -e '.version' ]; then
  VERSION=`pwd | sed 's/[a-z/-]//g'`
  echo $VERSION > .version
  rvm gemset create $VERSION
fi
VERSION=`cat .version`
rvm use 1.9.2@$VERSION

This script forces RVM to create new gem environment for each our project/version.

But each time we was deploying new version RVM asks us to confirm new .rvmrc file.

When we cd to this directory first time, we are getting something like:

  ===============================================================
  = NOTICE:                                                     =
  ===============================================================
  = RVM has encountered a not yet trusted .rvmrc file in the    =
  = current working directory which may contain nasty code.     =
  =                                                             =
  = Examine the contents of this file to be sure the contents   =
  = are good before trusting it!                                =
  =                                                             =
  = Press 'q' to exit the reader when finished reading the file =
  ===============================================================

  (press enter to continue when ready)

This is not as bad for development environments, but with auto deploy it require to manually confirm each new version on each server.

Is it possible to skip this confirmation?

© Server Fault or respective owner

Related posts about linux

Related posts about ruby