我似乎与我的想法是捆绑的标准功能挣扎,根据the manual 到specifiy该宝石应该在需要使用:platforms
选项或platforms
块与捆绑和不同平台的宝石要求工作
我想specifcy一个不同版本的宝石依赖于红宝石的版本中使用
source "http://rubygems.org"
gem "trollop", "~> 1.16.2"
gem "chronic", "~> 0.6.4"
gem "highline", "~> 1.6.2"
gem "colorize", "~> 0.5.8"
gem "queryparams", "~> 0.0.3"
platforms :ruby_18 do
gem "json"
gem "activesupport", "~>2.8.9"
end
platforms :ruby_19 do
gem "activesupport", "~>3.1.3"
end
但是失败运行bundle install
You cannot specify the same gem twice with different version requirements.
You specified: activesupport (~> 2.8.9) and activesupport (~> 3.1.3)
你可以在Gemfile中平台特定的要求,请查看我的回答 – klaffenboeck