Skip to content

tzylks/InvoiceProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

React/Rails Project Setup Guide

Requirements

  • Ruby 2.7.4
  • NodeJS (v16), and npm
  • Postgresql

Install the Latest Ruby Version

Verify which version of Ruby you're running by entering this in the terminal:

$ ruby -v

If none, run:

$ rvm install 2.7.4 --default

You should also install the latest versions of bundler and rails:

$ gem install bundler
$ gem install rails

To install Postgres for WSL, run the following commands from your Ubuntu terminal:

```console
$ sudo apt update
$ sudo apt install postgresql postgresql-contrib

Then confirm that Postgres was installed successfully:

$ psql --version

Run this command to start the Postgres service:

$ sudo service postgresql start

Finally, you'll also need to create a database user so that you are able to connect to the database from Rails. First, check what your operating system username is:

$ whoami

If your username is "ian", for example, you'd need to create a Postgres user with that same name. To do so, run this command to open the Postgres CLI:

$ sudo -u postgres -i

From the Postgres CLI, run this command (replacing "ian" with your username):

$ createuser -sr ian

Then enter control + d or type logout to exit.

This guide has more info on setting up Postgres on WSL if you get stuck.

Postgresql Installation for OSX

To install Postgres for OSX, you can use Homebrew:

$ brew install postgresql

Once Postgres has been installed, run this command to start the Postgres service:

$ brew services start postgresql

Once configured

Run the following commands from /example-project

$ bundle install
$ rails db:migrate
$ rails s
$ npm i --prefix client
$ npm start --prefix client

ENDPOINT

Once you have started the server, visit localhost:3000/the_invoices

About

Invoice creation tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors