Building a blog using Bootstrap 5 with Ruby on Rails 6 in MVC pattern.
Open the browser at the address https://gustavobarreto.fly.dev/
This repository is part of the Curso Ruby on Rails 6 MVC on YouTube.
Ruby version | 3.2.0 |
Rails version | 7.0.4 |
Database | SQLite3 (dev) / PostgreSQL (prod) |
# 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
# 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 <your@email.com>'
user_name: your@email.com
password: your_password
exception_recipients: exceptions@example.com
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
.