Usage

  • Run bundle install to install all dependencies
  • Environment variables:
    • Setup the application environment variables in the .env file (check .env.example for guidance)
  • Database setup:
  bundle exec rake db:create
  bundle exec rake db:migrate
  • Run ruby app.rb to start server

Tests

  • Database setup:
  bundle exec rake db:create
  bundle exec rake db:migrate
  bundle exec rake db:test:prepare
  • Run rspec to run all application specs or rspec path/to/file_spec.rb to run a specific set of specs.

Useful commands

  • bundle exec irb -r app.rb: Fire up the application via the command line (similar to rails c in the Ruby on Rails framework).
  • bundle exec rake db:create_migration NAME=create_users: Create a migration with name create_users.rb