Skip to content

Instantly share code, notes, and snippets.

@fdietz
Last active April 25, 2021 10:53
Show Gist options
  • Save fdietz/8d56fa9f3597651684a65497f8da8bd4 to your computer and use it in GitHub Desktop.
Save fdietz/8d56fa9f3597651684a65497f8da8bd4 to your computer and use it in GitHub Desktop.
ubuntu wsl rails setup

Setup rails

https://gorails.com/setup/windows/10

sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

sudo apt install libpq-dev

install postgres

https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart

sudo apt install postgresql postgresql-contrib

start progress

sudo /etc/init.d/postgresql start

set password for user "postgres" to "postgres"

sudo -u postgres psql

alter user postgres password 'postgres';

create database

bundle exec rails db:create bundle exec rails db:migrate

Redis

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04

install redis

sudo apt install redis-server

start redis

sudo /etc/init.d/redis-server start

Elastic Search

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-20-04 https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-20-04

install elastic search

sudo apt install default-jre

curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt update
sudo apt install elasticsearch

start

sudo -i service elasticsearch start

poppler for pdf preview

sudo apt install poppler-utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment