Skip to content

aimemalaika/catalog-ruby

Repository files navigation

Catalog of Things - Ruby Capstone

In this project, we created a console app that will help users to keep a record of different types of things you won: books, music albums, movies, and games. Everything based on the UML class diagram. The data stored in JSON files but we also prepared a database with tables structure analogical to our program's classes structure.

Preview

Table of Contents

Description

A console app that will help you to keep a record of different types of things you won: books, music albums, movies, and games.


Postgres Ruby

Built With

  • Technologies: Ruby, PostgreSQL, RSpec

Getting Started

Check the following instructions to install and use the project in you local machine!

Prerequisites

To begin with, you need to be able to use the ruby command, if you don't have it you can install it using any of these commands:

MacOS

brew install rbenv ruby-build
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

# Install Ruby
rbenv install 3.0.1
rbenv global 3.0.1
ruby -v

Ubuntu

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 3.0.1
rbenv global 3.0.1
ruby -v

Windows

Use WSL


Setup

Once you have installed ruby you need to clone this project's repository, use this command in your terminal:

$ git clone https://github.com/aimemalaika/catalog-ruby.git
$ cd catalog-ruby

Usage

To open the app in your terminal run this command:

$ ruby ./main.rb

Testing

$ rspec ./spec

Database

This repository includes files with plain SQL that can be used to recreate a database:

  1. Run this in your bash terminal to gain access to postgres command line
$ psql postgres
  1. Create a new database with any name ('vet-clinic' is suggested), and connect to that database.
# CREATE DATABASE <database_name>;
# \c <database_name>
  1. Use schema.sql to create all tables. Copy and paste the content of this file into the postgres command line. That should create the tables in your database. Now verify it. The following command displays all tables in your database:
# \d

And that's pretty much all. At this point, feel free to experiment by inserting data and running queries!


Collaborators

👤 Aime Malaika

Platform Badge
GitHub @aimemalaika
Twitter @aimemalaika
LinkedIn aimemalaika

👤 Kyrillos

Platform Badge
GitHub @bondok6
Twitter @kyrillos
LinkedIn kyrillos

👤 Eduardo

Platform Badge
GitHub @eduardosancho
Twitter @sanchitobless
LinkedIn Eduardo

Show your support

Give a ⭐️ if you like this project!


Acknowledgments

The ideas and inspiration from this project are coming from this online school of software development:


📝 License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages