This is a web application to manage contests, user's login/registration and participation in contests uploading audios.
- Built on Ruby and Ruby on Rails.
- Bootstrap as a front-end framework.
- Uses local storage to store images and audios.
- Uses a relational database.
This application was created using:
- Ruby 2.5.3
- Rails 5.2.2
- Ubuntu 18.4
- MySQL 14.14
- Install Ruby on Rails, follow this link.
- Install Git, follow this link.
- Install MySQL, follow this link.
- Configure these environment variables:
Environment variable | Example | Description |
---|---|---|
CONTESTS_SERVER_URL |
http://localhost:8000/ | The server URL where web application is deployed |
CONTESTS_DATABASE_HOST |
localhost or 127.0.0.1 | The database host |
CONTESTS_DATABASE_USER |
root | The database user |
CONTESTS_DATABASE_PASSWORD |
12345 | The database password |
CONTESTS_DATABASE_NAME |
contests | The database name |
CONTESTS_PATH_IMAGES |
/home/images/ | The path for images |
CONTESTS_PATH_ORIGINAL_FILES |
/home/audio/original/ | The path where ORIGINAL audio files will be stored |
CONTESTS_PATH_CONVERTED_FILES |
/home/audio/converted/ | The path where CONVERTED audio files will be stored |
-
Go to
bin/
folder. -
Install the MySQL gem and dependencies:
sudo apt-get install libmysqlclient-dev
gem install mysql2
- Install all the necessary gems and update the existing ones:
gem update
gem install rails
bundle install
- Create database model:
rails db:migrate
- Run the server:
rails server -p 8000
- Go to your favorite web browser and type:
http://localhost:8000/
- Enjoy.