你检查你的 rvmrc 文件吗? [英] Do you check in your rvmrc file?

查看:35
本文介绍了你检查你的 rvmrc 文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ruby 版本管理器允许我们在每个项目中使用 .rvmrc 文件来设置要加载的 ruby​​ 版本和 gem.是否应将此文件签入源代码管理?或者这是否对其他开发者的工作环境假设太多?

Ruby Version Manager allows us to use an .rvmrc file in each project to set up which ruby version and gem set to load. Should this file be checked in to source control? Or does this presume too much about other developers' working environment?

推荐答案

源代码控制管理主要是关于再现性:您是否能够根据您存储的内容再现开发工作的一个版本你的单片机?

Source Control Management is mainly about reproducibility: are you able to reproduce a version of a development effort based on what you have stored in your SCM?

如果您的项目中的任何开发人员都需要该 .rvmrc 文件才能工作(使用正确的工件),那么是的,您应该对其进行版本控制.

If that .rvmrc file is needed for any developer on your project to be able to work (with the right artifacts), then yes, you should versioned it.

RVM 最佳实践所述:

没有.2 - 将您的 rvmrc 签入源代码管理.

通过将上述 rvmrc 与您的应用一起检查到源代码管理中,您可以确保所有用户在使用 rvm 时拥有一致的环境.

By checking the aforementioned rvmrc into source control along side your app, you're ensuring all users have a consistent environment when they're using rvm.

通过自动化 gemset 安装等(例如,查看 rvm-site 存储库中的 rvmrc 或 TEDxPerth 存储库的 rvmrc),您还可以像更改目录一样简单地开始使用.

By also automating gemset installs and the like (e.g. check out the rvmrc in the rvm-site repository or the TEDxPerth repostory's rvmrc) you also make getting started as simple as changing directory.

除此之外,您还可以自动使您的部署设置您的应用程序特定环境.

On top of this, you can also automatically make your deployments setup your application specific environment.

其他开发人员可以通过以下方式在他们的 RVM 上停止使用 gemset:

Other developers can turn of use of gemsets on their RVM with:

echo rvm_ignore_gemsets_flag=1 >> ~/.rvmrc

这将使他们始终使用默认 gemset.

This will make them use default gemset always.

这篇关于你检查你的 rvmrc 文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆