Logging in Sinatra?

Sinatra 1.3 will ship with such a logger object, exactly usable as above. You can use edge Sinatra as described in “The Bleeding Edge“. Won’t be that long until we’ll release 1.3, I guess. To use it with Sinatra 1.2, do something like this: require ‘sinatra’ use Rack::Logger helpers do def logger request.logger end end

How do you configure WEBrick to use SSL in Rails?

While the scripts directory in Rails 4 is gone, the bin directory remains. You can get WEBrick working with an SSL certificate by editing the bin/rails script. Tested on Rails 4 and Ruby 2.1.1, installed with rbenv. Much of this is from this blog post and this Stack Overflow question. #!/usr/bin/env ruby require ‘rails/commands/server’ require … Read more