Deployment guide for back-end server
Install Ruby version ~> 1.9.2, Ruby on Rails version ~> 3.2.8, RubyGem ~> v1.8.24. Reference to: http://rubyonrails.org/download
Configure database following the steps below.
$ bundle install $ rake db:migrate $ rake db:seed
- Populate sample data for manual testing.
$ rake db:populate_demo_user
- Populate sample data for automated testing. (Ignore if not running automated testing).
$ rake db:populate
- Start the server
$ rails server
- Server will be up and running at localhost:3000
- Download and Install MySql database server from http://dev.mysql.com/downloads/mysql/
- Login into MySql Db server using the root account.
$ mysql -u root -p <enter passsword>
After logged in, we will start configure the database:
- Create 3 database: describedotme_development, describedotme_test, describedotme_production (for development, test and producton environment)
CREATE DATABASE IF NOT EXISTS describedotme_development; CREATE DATABASE IF NOT EXISTS describedotme_test; CREATE DATABASE IF NOT EXISTS describedotme_production;
- Instead of running the db as root (which could be dangerous), the site is configure to run as another db user. Create db user: describedotme, password: describedotme (subject to change upon deployment)
CREATE USER 'describedotme'@'localhost' IDENTIFIED BY 'describedotme';
- Grant all priviliges for user describedotme
GRANT ALL PRIVILEGES ON describedotme_development.* TO describedotme@localhost; GRANT ALL PRIVILEGES ON describedotme_test.* TO describedotme@localhost; GRANT ALL PRIVILEGES ON describedotme_production.* TO describedotme@localhost;