- Ruby v2.4.0
- Rails v5.1.4
- DBMS - mysql Ver 14.14 Distrib 5.6.28
- Install all gems
$ bundle install
- Initalize the app/config/database.yml file
- Create the database
$ rails db:create
- Run all migrations
$ rails db:migrate
- Initalize app/config/secrets.yml, app/config/application.yml
- To create admin account, run
$ rake admin:new
- To create deals and manage the application, you need to login using your admin account.
- Create non-admin user by going to Create Account page and then confirm your account to login using it.
- To publish the current day's deals for 24 hours, run
$ rake admin:publish_deal
- To invoke Delayed Jobs, run following in rails console:-
-- First, query for a job from Delayed::Job
-- Second,
$ job = Delayed::Job.find_by(id: 4)
$ job.invoke_job