- Initially install your pry-rails to group development on your apps Gemfile
group :development do
# ..
gem 'pry-rails'
# ..
end
group :development do
# ..
gem 'pry-rails'
# ..
end
# lib/encryptor.rb | |
# Module to dynamic encrypt attributes per model | |
module Encryptor | |
def has_encrypted_attributes(*attrs) | |
attrs.each do |attr| | |
# Define the dynamic getter | |
define_method(attr) do | |
self[attr].present? ? Encryptor.crypt.decrypt_and_verify(self[attr]) : self[attr] | |
end | |
# Define the dynamic setter |
This guide covers the process of deploying to Ubuntu 15.04 Sidekiq using Upstart for spawning and daemonizing of the processes and not systemd. Also it contains the deployment tasks for Capistrano 3 and not uses the capistrano-sidekiq gem gem as it does not defer process control to Upstart. It dictates the steps you need to follow in order to achieve sidekiq running after deployment and on system (re)boot. This will not cover how to install sidekiq on server side, redis connection etc, we assume that this has already performed and it works.