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

posted @ 2016-12-03 12:02  爱玩的安哥  阅读(203)  评论(0编辑  收藏  举报