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

前端之家收集整理的这篇文章主要介绍了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.

原文链接:https://www.f2er.com/ruby/264878.html

猜你在找的Ruby相关文章