微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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.jb51.cc/ruby/264878.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐