Add bootstrap and its dependencies:
yarn add bootstrap jquery popper.js
in config/webpack/environment.js add the following:
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |
# | |
# Sidekiq auto start using systemd unit file for Ubuntu 16.04 | |
# | |
# Put this in /lib/systemd/system (Ubuntu). | |
# Run: | |
# 1. systemctl enable sidekiq (to enable sidekiq service) | |
# 2. systemctl {start,stop,restart} sidekiq (to start sidekiq service) | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). |