加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 23:18:52 所属栏目:百科 来源:网络整理
导读:是不是项目.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/c
是不是项目.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 here和commit 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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读