My client wants her entire app (all links) to run over HTTPS/SSL.
I put
config.force_ssl = true
in config/application.rb. However, now Safari and Firefox and Opera are all griping about app, with different errors.
(From Firefox, “ssl_error_rx_record_too_long”)
Do I need a certificate? Or is there a simpler solution?
It turned out that I needed to do the following to make the entire Rails 3.2 app run over SSL:
1) In config/application.rb, instead of ‘config.force_ssl’, use the gem ‘rack-ssl-enforcer’, and
2) Create a certificate using openssl/mod-ssl (CentOS)
3) Use “thin” instead of WEBrick – thin seems easier to configure for SSL.
Thin gets configured to use the certificate files generated in Step 2.