Poetry of Programming

Its about Ruby on Rails – Kiran Soumya


SSL/HTTPS on Devise + Rails3

I have seen gems like ssl_requirement, but its too complicated for securing just two pages of user login and sign up.

Referred few blogs and found few useful links for the same:

1> For
# Creating your private key
# Creating your certificate signing request
# Getting your certificate
# Configuring your web server
Refer: http://www.buildingwebapps.com/articles/79189-using-ssl-in-rails-applications
2> For Setting up Rails app with Devise, I have referred this :

More useful links:


Rake Task in Rails 3 on Production ENV

Cannot execute Rake Task in production environment? Does it throws errors of uninitialized objects or refuses to load Model classes?

To execute a rake task for eager loading we require,
config.threadsafe! to be disabled in production which is enabled by default.

But our requirement is to get it disabled only on running a rake task.

Rake already sets a Ruby global: $rails_rake_task

So, in config/environments/production.rb, just say:

 config.threadsafe! unless $rails_rake_task