Gemfile分平台加载gem

Gemfile分平台加载gem

区分平台以便加载不同的web server,象tzinfo-data只适用于windows
  1. # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
  2. if RUBY_PLATFORM=~ /win32|mingw/ 
  3.   gem 'tzinfo-data'
  4.   gem 'thin'
  5. else
  6.   gem 'puma'
  7. end

原文地址:https://www.cnblogs.com/angestudy/p/6128352.html