After creating a dozen or so Ruby on Rails app, I realized I was using the same configuration over and over again. This boilerplate code is intended to simply save time building a Rails 5.0+ app.
You'll need to do a few things to get up-and-running. Here are a few items:
- Install all the necessary gems with
bundle install
- Modify
config/database.yml
with a new database name. - Update your database with
rails db:wipe
- Start your web server with
rails server:start
- Create an account with http://mailgun.com and update your SMPT data in
config/environments/development.rb
. - Change your
ENV['SECRET_KEY_BASE']
Source
If you want to see an itemized list of modifications, I suggest reviewing the cliff notes within lib/tasks/app.rake
- Postgres for database
- Dotenv for storing imporant data
- Rerun watcher to help with automatic server restarts
- Devise for user authentication
- ERB to HAML to convert Devise pre-packaged templates
- High Voltage for simple static pages
- Font Awesome for icons
- Simple Form for simplified forms
- HAML (over ERB) for simplified HTML
- SASS for short-hand CSS
- Bootstrap for HTML + CSS templates
- Populator and Faker for creating fake data
- Rspec for testing
- Factory girl for fake unit test data
- Capybara for automated user simulations
Destroy and rebuild the test database with test data
rails db:wipe RAILS_ENV=test --trace
Migrate the test database
rails db:migrate RAILS_ENV=test --trace
Simply populate the test database with seed data. This is the alternative to fixtures
.
rails db:seed RAILS_ENV=test --trace