Das*_*tor 5 bundle config bundler
我正在尝试使用捆绑器来安装一些软件包,我想使用的命令是:
bundle install --path vendor/bundle
Run Code Online (Sandbox Code Playgroud)
然而,由于libxml2 是一个混蛋,我需要使用如下命令预先设置配置:
bundle config --local build.nokogiri --with-xml2-include=dir1 --with-xml2-lib=dir2 --with-xslt-include=dir3 --with-xslt-lib=dir4
Run Code Online (Sandbox Code Playgroud)
但当我查看该.bundle/config文件时,我看到:
BUNDLE_BUILD__NOKOGIRI: --with-xml2-include=dir1
--with-xml2-lib=dir2 --with-xslt-include=dir3 --with-xslt-lib=dir4
Run Code Online (Sandbox Code Playgroud)
您会注意到dir2、dir3和dir4出现在下一行,而不是与 位于同一行dir1。这是一个问题,因为当我键入bundle config显示当前配置时,我发现它无法识别第二行配置:
Settings are listed in order of priority. The top value will be used.
build.nokogiri
Set for your local app (/path/app/.bundle/config): "--with-xml2-include=dir1"
Run Code Online (Sandbox Code Playgroud)
如何保留bundle config多个构建选项?仅供参考,我已经尝试在它们周围加上引号,并删除--local- 它们产生了相同的结果。
我使用的是捆绑器版本 1.3.5
在我的例子中 ( bundler-1.17.2, bundler-2.0.2) 它将所有参数作为一个传递:
$ bundle config --local build.openssl \
--with-openssl-lib=/usr/lib/openssl-1.0 \
--with-openssl-include=/usr/include/openssl-1.0
$ bundle install
Run Code Online (Sandbox Code Playgroud)
$BUNDLE_PATH/ruby/2.6.0/extensions/x86_64-linux/2.6.0-static/openssl-2.0.0/gem_make.out:
/home/yuri/.rubies/ruby-2.6.3/bin/ruby \
-I /home/yuri/.rubies/ruby-2.6.3/lib/ruby/2.6.0 \
-r ./siteconf20191006-3579806-yy73w4.rb extconf.rb \
--with-openssl-lib\=/usr/lib/openssl-1.0\ --with-openssl-include\=/usr/include/openssl-1.0
Run Code Online (Sandbox Code Playgroud)
这是一个已知问题,已在 中修复bundler-2.1.0.pre.1,并且预计会借用到bundler-2.1.0.
| 归档时间: |
|
| 查看次数: |
1115 次 |
| 最近记录: |