linux – 是否可以跳过.rvmrc确认?

linux – 是否可以跳过.rvmrc确认?,第1张

概述我们使用 RVM来管理Ruby安装和环境. 通常我们使用这个.rvmrc脚本: #!/bin/bashif [ ! -e '.version' ]; then VERSION=`pwd | sed 's/[a-z/-]//g'` echo $VERSION > .version rvm gemset create $VERSIONfiVERSION=`cat .version` 我们使用 RVM来管理Ruby安装和环境.

通常我们使用这个.rvmrc脚本:

#!/bin/bashif [ ! -e '.version' ]; then  VERSION=`pwd | sed 's/[a-z/-]//g'`  echo $VERSION > .version  rvm gemset create $VERSIONfiVERSION=`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

问候,

菲尔

总结

以上是内存溢出为你收集整理的linux – 是否可以跳过.rvmrc确认?全部内容,希望文章能够帮你解决linux – 是否可以跳过.rvmrc确认?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1045161.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存