Skip to content

I started working on this project with the permission of PinkWug to practice what I learned in the Noble Desktop Full Stack Web Development Bootcamp. This web app is currently in deployment.

Notifications You must be signed in to change notification settings

Samuel1698/PinkWug.live

Repository files navigation

Ruby CodeQL

License:

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

I can only grant this license to my work, and as such, none of the images in app/assets/images are free to use, copy, or share.

Dependencies:

To run this application you need

  • Ruby 3.0.0
  • Rails 6.1.4.1
  • PostgreSQL

Install Command Line Tools (MacOS)

  1. Open Terminal
  2. In the Terminal window, type the following and press Return:
xcode-select --install
  1. Click Install

Installing Homebrew (MacOS)

Homebrew is a command line tool that makes it easy to install software in Mac OS. Used here to install rbenv, Ruby, and Rails.

  1. Go to brew.sh and copy the command, it should look something like this:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Paste the command in the terminal and press Return
  2. Once you follow the prompts, type:
brew doctor

If everything is working, the Terminal will print Your system is ready to brew

Installing rbenv, Ruby, and Rails

Visit https://gorails.com/setup/ and follow the instructions for your operating system

Remember to input Ruby 3.0.0 when typing the command as instructed

Installing Yarn

This is required for Rails version 6 to compile the frontend assets.

  • macOS
    brew install yarn
  • Debian/Ubuntu
    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
    echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
    Then
    sudo apt update && sudo apt install yarn

For further instructions on Linux, visit the Yarn Installation Website

Installing PostgreSQL

  • macOS

    1. To install postgres run the following command in the terminal. It will install the command line console (psql) as well as the local server
    brew install postgresql
    1. To start the service and log-in to it, run:
    brew services start postgresql
    1. If you wish to start the server automatically when you restart your computer, run:
    pg_ctl -D /usr/local/var/postgres start
  • Debian/Ubuntu

    1. Update the package list
    sudo apt-get update
    1. Install PostgreSQL
    sudo apt-get install postgresql postgresql-contrib
    1. To start the server run:
    pg_ctl -D /home/linuxbrew/.linuxbrew/var/postgres start

Creating the Database

  1. Go into the postgres command line
psql postgres
  1. Here we will need to create a new user. Substitude username and password for your own. Don't forget the ; at the end.
CREATE ROLE <username> WITH LOGIN PASSWORD "<password>";
ALTER ROLE <username> CREATEDB;
  1. Type \du to see your new user. Quit the postgres console with \q
  2. Log-in as the new user to create the required databases. In the terminal, type:
psql postgres -U <username>

Then

CREATE DATABASE pinkwug;

CREATE DATABASE pinkwug_test;
  1. Type \list to see a list of databases. Exit the console with \q

Cloning the repo

  1. Open the terminal, and navigate to a folder without spaces on its name (webpacker won't work if it does) by typing cd, then dragging and dropping the folder into the console. It should copy the path.
  2. Run the command:
git clone https://github.com/Samuel1698/PinkWug.live.git
  1. Open the new folder
cd PinkWug.live

Final Steps

  1. While in the PinkWug.live folder, run these commands in the command line:
bundle install

yarn upgrade

bundle exec rails webpacker:install

rails db:reset
  1. You're now ready to start the server, in the command line, type:
rails s

Navigate to http://localhost:3000/

About

I started working on this project with the permission of PinkWug to practice what I learned in the Noble Desktop Full Stack Web Development Bootcamp. This web app is currently in deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published