gemspec add proper dir to required path, fix middleware argument error