I hereby claim:
- I am gawin on github.
- I am gawin (https://keybase.io/gawin) on keybase.
- I have a public key ASD4QuHjJ3Jra6BVlMQWdRnblQ1t96MmCBlf2nHmI7-tRgo
To claim this, I am signing this object:
# encoding: utf-8 | |
module Mongoid #:nodoc: | |
# Include this module to set the creator of documents. | |
# This will add a created_at and updated_at field to the +Document+, managed automatically. | |
# | |
# To use: | |
# | |
# class Person | |
# include Mongoid::Document | |
# include Mongoid::Userstamps |
# encoding: utf-8 | |
module Mongoid #:nodoc: | |
# Include this module to set the creator of documents. | |
# This will add a created_at and updated_at field to the +Document+, managed automatically. | |
# | |
# To use: | |
# | |
# class Person | |
# include Mongoid::Document | |
# include Mongoid::Userstamps |
require "#{RAILS_ROOT}/lib/mongoid/lib/observing.rb" | |
# Initializer for Observers | |
User.observers = :user_observer | |
User.instantiate_observers | |
# The preferred syntax, similar to AR's setup | |
# Mongoid.configure do |config| | |
# config.observers = :user_observer |
I hereby claim:
To claim this, I am signing this object:
Today I found myself in the situation where web pages were not fully served or randomly hang. Often triggering a ERR_SPDY_PROTOCOL_ERROR. First, I suspected this was due to CloudFlare. After some investigation, I found it was my own NGINX installation that was lacking.
Apparently the build of NGINX that came with OpenResty didn't have the tmp_paths set correctly. This can be fixed during the configuration of the build, or afterwards in the configuration files itself. Which was kind of fun since this app didn't use OpenResty but only Sinatra served by Puma and RACK.
[crit] 22084#0: *142 open() "/var/lib/nginx/proxy/1/01/0000000011" failed (13: Permission denied) while reading upstream, client: 111.111.111.111, server: my_app.example.com, request: "GET /path HTTP/1.1", upstream: "http://unix:///path/to/app/tmp/puma.sock:/path", host: "my_app.example.com", referrer: "https://my_app.example.com/path"