Skip to content

Instantly share code, notes, and snippets.

@ehlertij
Created October 9, 2012 17:14
Show Gist options
  • Save ehlertij/3860128 to your computer and use it in GitHub Desktop.
Save ehlertij/3860128 to your computer and use it in GitHub Desktop.
Rails 3 set default server and port
# config/boot.rb
# Setting default port to 3010
require 'rails/commands/server'
module Rails
class Server
alias :default_options_alias :default_options
def default_options
default_options_alias.merge!(:Port => 3010)
end
end
end
# Setting default server to Puma
module Rack
module Handler
def self.default(options={})
Rack::Handler.get('Puma')
end
end
end
@wellington1993
Copy link

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment