2012-04-16 86 views
2

在我的Gemfile我有以下行:如何避免在Windows中安装gem?

gem "thin", :group => [:staging, :production] 

当我运行捆绑在它实际安装薄的发展,这是在寡妇盒一个问题,因为薄取决于EventMachine的不编译安装。有没有办法避免在Windows中一起安装这些宝石?

实际上,我们试图运行运行:

bundle install --without staging production 

,并试图安装薄反正。

解决此问题的正确方法是什么?

回答

2

我这样做。丑陋,但是有效

if RUBY_PLATFORM != "i386-mingw32" # if Windows 
    gem "thin" 
end