Blackboard-lms serves as an LMS platform tailored to meet the training demands of the hotel and hospitality industry. Blackboard-lms is an open-source project developed using the Ruby On Rails framework.
Clone the repo and install the dependencies
You can either refer this https://www.postgresql.org/ or use package manager of your os to install postgres. In case of a mac os you can use https://postgresapp.com/ to set it up very easily.
You can refer to this and install redis. Start the redis server in your local machine
The first step is to install ruby. In order to install ruby use rbenv or rvm so that you can easily manage the different ruby versions.
Using rbenv or rvm is a personal preference. To use rbenv go to rbenv and for rvm you can go here
After installing ruby clone the repo and then you can follow the steps below to setup the application.
$ gem install bundler
$ brew install imagemagick
$ export EDITOR="code --wait" # or export EDITOR="vim --wait"
# copy the contents of config/credentials.yml.enc.example file and
# generate your master key and edit the credential file
$ rails credentials:edit
replace the editor content with the copied content, edit and save then close the file.
You can either install husky or use the git command below to setup the git precommits hooks
git config core.hooksPath .husky
To install Rails dependencies and seed the database by running:
./bin/setup
Start the server by executing following command.
bin/dev
Make sure you have setup the test environment as mentioned in the earlier section
$ rspec
$ rspec -f d # view test descriptions
$ rspec -f d --tag focus # view test descriptions and run only focussed sections, usefull for debugging
Note: prefix bundle exec
if you are unable to run it using rspec
You can run guard to keep running the tests during TDD.
$ guard
Install docker in your local and then build and run the application locally as follows
You can build the containers using docker compose build
command
docker compose up
to run the application using docker in local.
You might have to do some additional setup like generating a master key and setting the RAILS_MASTER_KEY in Dockerfile