私は2つのGemfilesを使用して悪い習慣であることに同意し、私のGemfileでplatform
フラグと一緒にRUBY_PLATFORM
定数を伴う解決策を発見しました。これはもっとも洗練されたソリューションではないかもしれませんが、それは私にとってはうまくいきます。ここで
は、好奇心旺盛な読者のために私のコードの塊です:
group :development, :test do
# Mac OSX notifications
gem 'growl_notify' if RUBY_PLATFORM.downcase.include?("darwin")
gem 'growl' if RUBY_PLATFORM.downcase.include?("darwin")
# Gnome notifications => aka for Linux
gem 'libnotify' if RUBY_PLATFORM.downcase.include?("linux")
# Guard-spork doesn't work with windows but it's
# awesome for other Operating Systems.
gem 'guard-spork' if RUBY_PLATFORM.downcase.include?('darwin') || RUBY_PLATFORM.downcase.include?('linux')
# Windows Rubies (RubyInstaller)
platforms :mswin, :mingw do
# Windows notifications
gem 'rb-notifu'
end
end
http://stackoverflow.com/questions/7962743/bundler-load-multiple-gemfilesの可能性のある重複 – Conner