2
我的目標是讓打包程序嘗試安裝每個gem,但如果gem無法安裝(通常是由於本機擴展),並且不需要gem它繼續嘗試安裝下一個。如果gem失敗並且不需要,允許打包程序繼續
我一直在努力這一段時間,這是因爲在Linux上試圖建立rb-fsevent with native extensions
爲growl_notify
。任何幫助,將不勝感激。
的Gemfile:
source 'http://rubygems.org'
def darwin_only(require_as)
RUBY_PLATFORM.include?('darwin') && require_as
end
def linux_only(require_as)
RUBY_PLATFORM.include?('linux') && require_as
end
gem 'sinatra'
gem 'httparty', '~>0.8.1'
group :development do
gem 'shotgun'
gem 'heroku'
gem 'jasmine-headless-webkit'
gem 'guard-jasmine-headless-webkit'
gem 'growl_notify', require: darwin_only('growl_notify')
gem 'rb-fsevent', require: darwin_only('rb-fsevent')
gem 'rb-inotify', require: linux_only('rb-inotify')
gem 'libnotify', require: linux_only('libnotify')
end