我们使用
RVM来管理Ruby安装和环境.
通常我们使用这个.rvmrc脚本:
#!/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
此脚本强制RVM为每个项目/版本创建新的gem环境.
但每次我们部署新版本时,RVM都会要求我们确认新的.rvmrc文件.
当我们第一次cd到这个目录时,我们得到的结果如下:
=============================================================== = 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)
这对于开发环境来说并不是那么糟糕,但是对于自动部署,它需要手动确认每个服务器上的每个新版本.
是否可以跳过此确认?
解决方法
我在Waynes blog,http://wayneeseguin.beginrescueend.com/上找到了这些笔记
基本上,添加:
export rvm_trust_rvmrcs_flag=1
到〜/ .rvmrc将绕过检查.
还有rvm rvmrc< command> [dir]用于手动信任/取消.rvmrc文件.
寻找同样的事情,以为我会发布解决方案.
HTH
问候,
菲尔
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。