在我的 Gemfile 中,我有以下行:
gem "thin", :group => [:staging, :production]
当我在开发中运行bundle install时,它实际上安装了thin,这是Widows框中的一个问题,因为thin依赖于无法编译的eventmachine。有没有办法避免在 Windows 中同时安装这些 gem?
我们实际上尝试过运行:
bundle install --without staging production
并且它仍然尝试安装 Thin。
解决此问题的正确方法是什么?
最佳答案
我就是这么做的。丑陋,但有效
if RUBY_PLATFORM != "i386-mingw32" # if Windows
gem "thin"
end
关于ruby-on-rails - 如何避免在 Windows 中安装 gem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10173519/