Does phusion passenger use forking? If so, where should I set an after_fork
configuration, as recommended by Heroku for unicorn (re: Setting up PostGIS with Rails)?
From Heroku's docs:
Additionally, if unicorn or any other process forking code is used where the connection is re-established, make sure to override the adapter to postgis as well. For example:
# unicorn.rb
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
config = Rails.application.config.database_configuration[Rails.env]
config['adapter'] = 'postgis'
ActiveRecord::Base.establish_connection(config)
end
end