Skip to content

Building a blog using Bootstrap 5 with Ruby on Rails 6 in MVC pattern.

Notifications You must be signed in to change notification settings

peimelo/blogstrap

Repository files navigation

Blogstrap Tests Maintainability Test Coverage

Building a blog using Bootstrap 5 with Ruby on Rails 6 in MVC pattern.

This repository is part of the Curso Ruby on Rails 6 MVC on YouTube.

Ruby version 3.1.3
Rails version 6.1.7
Database SQLite3 (dev) / PostgreSQL (prod)

Initial settings to run the project

# clone the project
git clone https://github.com/peimelo/blogstrap.git

# enter the cloned directory
cd blogstrap

# install Ruby on Rails dependencies
bundle install

# install Node dependencies
yarn install

# create the development and test databases
rails db:create

# create the tables
rails db:migrate

# run the project
rails s

Open the browser at the address http://localhost:3000

Configuration for Production

# delete the config/credentials.yml.enc file
rm config/credentials.yml.enc

# run the command to create credentials and master key (replace 'code' if you don't use VS Code)
EDITOR="code --wait" bin/rails credentials:edit

Add the information below in the credentials to configure the email used by the Devise gem (replace with the values you want):

# ... your content above

# GMail
gmail:
  mailer_sender: 'Sender <[email protected]>'
  user_name: [email protected]
  password: your_password

# or Zoho
zoho:
  mailer_sender: 'Sender <[email protected]>'
  user_name: [email protected]
  password: your_password
  domain: your_domain.com.br

exception_recipients: [email protected]

Save and close the config/credentials.yml.enc file.

If you want to use another email provider, change it in the file config/environments/production.rb.

To configure Exception Notification, change it in the file config/initializers/exception_notification.rb.

Open the browser at the address https://blogstrap.fly.dev/