我在Windows 7上使用Ruby 1.9.3(mingw); 。我为它创建了特定的gemfile:Gemfile.mingw
。然后我设置了一个配置选项:
bundle config --local gemfile Gemfile.mingw
然后我检查这个选项是否已保存:
$ bundle config
Settings are listed in order of priority. The top value will be used.
gemfile
Set for your local app (c:/*****/.bundle/config): "Gemfile.mingw"
然后我运行bundle install
...只是为了看到它仍然尝试从默认Gemfile
安装宝石。
当然,当我运行bundle install --gemfile=Gemfile.mingw
时,它可以正常运行。但似乎它不服从本地配置!
使用bundler版本1.1.5,1.2.0.rc2进行测试。
我也尝试将gemfile配置选项设置为完整路径,不能正常工作,我不敢相信这个功能不起作用,可能我只是做错了。
答案 0 :(得分:2)
好的,我发现的唯一回应是对类似错误的评论:
不幸的是,当Bundler加载配置文件时,为时已晚。您需要使用BUNDLE_GEMFILE = Gemfile.sj bundle install或使用bundle install --gemfile Gemfile.sj来设置Gemfile。
https://github.com/carlhuda/bundler/issues/1315
看起来很奇怪的功能,它允许配置替代gemfile但它没有使用。