This blogpost shows how to setup Rails 6 with Bootstrap 4.
This snippet shows a somehow different and less customized approach.
$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js
class AddIndexForSearchableFieldsInDevelopers < ActiveRecord::Migration[7.0] | |
def up | |
execute <<-SQL | |
ALTER TABLE developers | |
ADD COLUMN textsearchable_index_col tsvector | |
GENERATED ALWAYS AS (to_tsvector('simple', coalesce(hero, '') || ' ' || coalesce(bio, ''))) STORED; | |
SQL | |
add_index :developers, :textsearchable_index_col, using: :gin, name: :textsearchable_index | |
end |
➜ railsdevs.com git:(local) bin/setup | |
== Installing dependencies == | |
https://github.com/Shopify/erb-lint.git is not yet checked out. Run `bundle install` first. | |
Bundler 2.3.12 is running, but your lockfile was generated with 2.3.4. Installing Bundler 2.3.4 and restarting using that version. | |
Fetching gem metadata from https://rubygems.org/. | |
Fetching bundler 2.3.4 | |
Installing bundler 2.3.4 | |
Fetching gem metadata from https://rubygems.org/......... | |
Fetching https://github.com/Shopify/erb-lint.git | |
Fetching https://github.com/pay-rails/pay.git |
"city","city_ascii","state_id","state_name","county_fips","county_name","lat","lng","population","population_proper","density","source","incorporated","timezone","zips","id" | |
"Prairie Ridge","Prairie Ridge","WA","Washington","53053","Pierce","47.1443","-122.1408","","","1349.8","polygon","False","America/Los_Angeles","98360 98391","1840037882" | |
"Edison","Edison","WA","Washington","53057","Skagit","48.5602","-122.4311","","","127.4","polygon","False","America/Los_Angeles","98232","1840017314" | |
"Packwood","Packwood","WA","Washington","53041","Lewis","46.6085","-121.6702","","","213.9","polygon","False","America/Los_Angeles","98361","1840025265" | |
"Wautauga Beach","Wautauga Beach","WA","Washington","53035","Kitsap","47.5862","-122.5482","","","261.7","point","False","America/Los_Angeles","98366","1840037725" | |
"Harper","Harper","WA","Washington","53035","Kitsap","47.5207","-122.5196","","","342.1","point","False","America/Los_Angeles","98366","1840037659" | |
"Telma","Telma","WA","Washington","53007","Chelan","47.8432","-1 |
require 'nokogiri' | |
require 'zlib' | |
require 'open-uri' | |
require 'net/http' | |
require 'net/https' | |
=begin | |
To get up and running on local: | |
git clone [email protected]:mphteam/list-hub.git | |
change directories to list-hub (cd list-hub) |
This blogpost shows how to setup Rails 6 with Bootstrap 4.
This snippet shows a somehow different and less customized approach.
$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js
#!/bin/bash | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
➜ dev-setup git:(first-setup) ✗ docker-compose up | |
Recreating dev-setup_db_1 ... done | |
Recreating dev-setup_api_1 ... done | |
Recreating dev-setup_rails_1 ... done | |
Attaching to dev-setup_db_1, dev-setup_api_1, dev-setup_rails_1 | |
db_1 | LOG: skipping missing configuration file "/pgdata/data/postgresql.auto.conf" | |
api_1 | [gin] Listening on port 3030 | |
db_1 | postgres: could not find the database system | |
db_1 | Expected to find it in the directory "/pgdata/data", | |
db_1 | but could not open file "/pgdata/data/global/pg_control": No such file or directory |
# in the terminal run brew install elasticsearch1.7.rb | |
class Elasticsearch17 < Formula | |
desc "Distributed search & analytics engine" | |
homepage "https://www.elastic.co/products/elasticsearch" | |
url "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.6.tar.gz" | |
sha256 "78affc30353730ec245dad1f17de242a4ad12cf808eaa87dd878e1ca10ed77df" | |
revision 1 | |
bottle :unneeded |