Skip to content

Instantly share code, notes, and snippets.

@simi simi/rails.rb
Created Oct 17, 2011

What would you like to do?
Rails 3.1.1 Webrick with SSL support
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
require 'rubygems'
require 'rails/commands/server'
require 'rack'
require 'webrick'
require 'webrick/https'
module Rails
class Server < ::Rack::Server
def default_options
:Port => 3000,
:environment => (ENV['RAILS_ENV'] || "development").dup,
:daemonize => false,
:debugger => false,
:pid => File.expand_path("tmp/pids/"),
:config => File.expand_path(""),
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
:SSLPrivateKey =>"vendor/ssl/gs.key"))),
:SSLCertificate =>"vendor/ssl/gs.crt"))),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.