Question

So I'm having some issues with getting my rails app to run on https. And I'm just trying to narrow down the possibilities with what is causing the issue.

I was wondering if I am missing any steps with configuring the Rails application itself (not the web server):

  1. In config/environments/production.rb

    Uncomment this line:config.force_ssl = true

    Source: http://simonecarletti.com/blog/2011/05/configuring-rails-3-https-ssl/

  2. Additional configuration for the Devise gem

    In config/environments/production.rb

    Add the following lines: config.to_prepare { Devise::SessionsController.force_ssl } config.to_prepare { Devise::RegistrationsController.force_ssl } config.to_prepare { Devise::PasswordsController.force_ssl } Source: https://github.com/plataformatec/devise/wiki/How-To:-Use-SSL-%28HTTPS%29

Is there any other steps I am missing? Currently I am seeing a 'This webpage is not available' message when trying to hit my server, not seeing any errors in the log files for the web server or Rails app.

I am seeing this error message though from my web browser: Error code: ERR_CONNECTION_REFUSED

Thanks

Was it helpful?

Solution

As it turns out the configuration in the question for the Rails app itself was setup properly and there were no other steps required there.

The issue was related to the SSL cert not being setup correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top