Yet another simple Ruby on Rails 5 (RoR) blog application. This is my RoR full stack web development learning project & example, including its automatic CI/CD setup and cloud platform deployment.
- Ruby 2.6.5
- Ruby on Rails 5.2.3, web framework.
- Slim Templating 4, HTML templating engine.
- Devise, flexible authentication solution.
- Ruby Recaptcha, recaptcha lib.
- Paper Trail, Track changes to your rails models.
- Will Paginate, auto pagination from ActiveRecord.
- RSpec Rails 3, BDD and test suite.
- Faker, A library for generating fake data such as names, addresses, and phone numbers.
- Factory Bot Rails, a library for setting up Ruby objects as test data.
- Capybara, acceptance test framework for web applications.
- Selenium, a browser automation framework and ecosystem.
- Bulma CSS, mobile first CSS framework.
- Postgresql 10
- Peru, a package manager for including other people's code in your projects.
- Vagrant, for development provisioning. Use Ubuntu 18.04 based.
- Ansible, for automate and simply Vagrant provision.
- Travis CI, for CI & CD pipelines.
- Heroku, for cloud deployment platform, host this apps for free 😄
- Multi user login.
- Post blog, with category, tags, and comments.
- Data audit trail & transaction history.
- Multiple resolution responsive view.
- Markdown as blog's content markup language.
- Todo:
- Blog post archive page.
- Setup email account for sending password recovery & instructions.
- Dashboard to view blog post, number of comments, etc.
-
Heroku
This is from automatic build (CI/CD). Plese visit https://simple-rblog.herokuapp.com
Demo account:
- email:
admin@example.com
- password:
admin
- email:
We need to have Ruby 2.6.5 or for ease the provisioning we can use Vagrant from this repository vagrant-ruby-dev.
There are several env variable should be config prior running apps:
DATABASE_USERNAME
, database username.DATABASE_PASSWORD
, database password.DATABASE_HOST
, database host.DATABASE_PORT
, database port.DATABASE_URL
, database connection string url.RECAPTCHA_SITE_KEY
, recaptcha site key, get it from here.RECAPTCHA_SECRET_KEY
, recaptcha secret key.
Install Rails & dependencies
bundle install
Init & setup database
rails db:setup
Seed sample data
rails db:seed
Run rails app locally
rails s
Or if you using and run inside Vagrant.
rails s -b 0.0.0.0
Access from http://localhost:3000
rspec
Copyright 2019 Maikel Chandika (mkdika@gmail.com). Code released under the MIT License. See LICENSE file.