summaryrefslogtreecommitdiff
path: root/config/unicorn.rb.example.development
blob: 0df028648d1e4c9e4a58d6129632bcfcbd515ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
worker_processes 2
timeout 60

before_fork do |server, worker|
  if /darwin/ =~ RUBY_PLATFORM
    require 'fiddle'

    # Dynamically load Foundation.framework, ~implicitly~ initialising
    # the Objective-C runtime before any forking happens in Unicorn
    #
    # From https://bugs.ruby-lang.org/issues/14009
    Fiddle.dlopen '/System/Library/Frameworks/Foundation.framework/Foundation'
  end
end