ruby-on-rails – 为什么rails默认忽略.bundle?

是不是项目.bundle / config指定与项目相关的配置?

解决方法

在bundle-config manpage上说:

This command allows you to interact with bundler’s configuration
system. Bundler retrieves its configuration from the local application
(app/.bundle/config),environment variables,and the user’s home
directory (~/.bundle/config),in that order of priority.
So ensure that you don’t have any configuration files that are taking priority over the one you want to use.

您可以自己配置此文件或使用bundle config(选项)设置选项,运行bundle config而不使用任何选项打印当前配置.
例如,您可以为MysqL gem设置编译时选项,如下所示:

bundle config build.MysqL --with-MysqL-config=/usr/local/MysqL/bin/MysqL_config

所以是的,app / .bundle / config用于为当前项目设置包选项.

编辑:
此更改已在提交efa85055中添加到Rails github存储库中.您可以查看该版本的file herecommit here.

提交消息来自José Valim,并提到您有关于以下问题的行:

Make bin/rails call rails/commands/application,fix generators usage
and update .gitignores.

再次编辑:
这是一个quote from bundler,为什么你不应该将.bundle目录检查到任何VCS.

Do not check in the .bundle directory,or any of the files inside it. Those files are specific to each particular machine,and are used to persist installation options between runs of the bundle install command.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...