An application where users are able to browse different projects uploaded by others, and also give feedback by commenting or reviewing.
- Ruby on Rails - Core framework
- PostgreSQL - Used for development database
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Make sure you have installed all of the following prerequisites on your development machine:
- Get asdf-vm
- Install required plugins
asdf plugin add ruby asdf plugin add nodejs asdf plugin add yarn asdf plugin add postgres
- Install tools
asdf install
- NOTE: You may get an error here saying
role <username> does not exist
. If this happens, try the following:psql -U postgres CREATE ROLE <username> SUPERUSER; ALTER ROLE "<username>" WITH LOGIN;
Please refer to .tool-versions
for the exact versions of the required dependencies.
- Install Ruby with RubyInstaller. (Note: you need a Ruby+Devkit installer)
- Install NodeJs
- Install yarn with
npm install -g yarn
After installing the Prerequisites, you need to
- Install all dependencies
bundle install yarn install
- Start your postgres server by running
postgres
- Create, migrate and seed the database
rails db:setup
- Start your local development server
rails s
- Install and run mailcatcher SMTP server
gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration" gem install mailcatcher mailcatcher -bf
On your local machine, you'll need to run the following services:
postgres
bin/shakapacker-dev-server
rails s
You can also run the SMTP server with:
mailcatcher -b
If you would like to run all required services within a single terminal window, you should install Overmind. The project contains a Procfile.dev
which you will be able to run with:
overmind start
The test suite is setup with the following technologies:
Current linters in the application are:
You can run all quality assurance features like so:
rubocop
erblint .
rspec
You can find Beloved Projects on the web. It is deployed to Heroku. Below you will find a set of instructions on how to setup the deployment process.
- Install Heroku CLI.
- Create an account for Heroku.
- Inside the project directory:
heroku login heroku apps:create beloved-projects heroku git:remote -a beloved-projects heroku buildpacks:add --index 1 heroku/nodejs heroku buildpacks:add --index 2 heroku/ruby git push heroku master
- You will have to create a PostgreSQL database on Heroku manually.
- Load your schema and migrate your database with the following commands:
heroku run rake db:schema:load heroku run rake db:migrate
- Done. You should check your deployed app's URL under Settings/Domains.