Run Rails Development Server with HTTPS

1.   Install thin as web server instead of webrick. Write below line in gemfile and do bundle install.

gem 'thin'

2.  In environments/development.rb file write below lines

config.force_ssl = true
config.ssl_port = 3001 # port will be your choice

3.  Now start server using below command

thin start --ssl -p 3001

Now go to web browser and start your localhost:3000 with https://localhost:3000

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s