Configuring WEBrick to use SSL in Rails 4

VikingR picture VikingR · Jan 17, 2014 · Viewed 14k times · Source

I have a Rails App that I want to deploy on SharePoint 2013.

In order to achieve some means of authentication, I need the WEBrick server to serve ssl https and listen to incoming https on port https://localhost:3001. Unfortunately, I am not very experienced with configuring the server.

I've have only found some outdated tutorials for older Rails version, that don't seem to do the job anymore.

Any tips are greatly appreciated.

Answer

Hugo picture Hugo · Apr 5, 2014

I know you asked for WEBrick, and excuse me for suggesting something else, but I would really recommend you to use Thin ruby web server (faster and lighter), so you can also start SSL and meet your requirement as easy as:

$ thin start --ssl -p 3001

Just don't forget to add gem 'thin' in your Gemfile ;-)