Skip to content

Siyangyang/MedicalPersistanceSystem2020

 
 

Repository files navigation

MedicalPersistanceSystem

https://mps-2020-fall.herokuapp.com/

QR code

how to install

git clone https://github.com/Siyangyang/MedicalPersistanceSystem2020.git
rvm install 2.4.0
rvm use 2.4.0

deployee to heroku

sudo snap install heroku --classic
heroku login --interactive
heroku keys:add
heroku apps:create
git push heroku master

here, if running on other branch then master, run following line instead

git push heroku [branch name]:master
#as we currently on mingreng's branch, we will be using
git push heroku [branch name]:master
heroku run rake db:setup
heroku run rake db:migrate
heroku run rake db:seed

How to link your git repo to an existing heroku app

heroku git:remote -a mps-2020-fall

##################################split line##################################

How to deploy on local:

This is way more tedious due to postgres

For more information see http://zetcode.com/db/postgresqlruby/

For now, a short guild to set up postgresql on local

Installation and set up:
sudo apt-get install postgresql
sudo apt-get install libpq-dev

to set up a password

sudo -u postgres psql postgres
psql (9.3.9)
Type "help" for help.

postgres=# \password postgres
#after setting up the password, use following to quit
postgres=# \q

now we can install bundle without error by run

bundle install

proceed to deploy this to local, first we need to initialize the db

sudo service postgresql start
sudo service postgresql status

we use sudo -u postgres createuser [user name]

sudo -u postgres createuser ubuntu
$ sudo -u postgres psql postgres
psql (9.3.9)
Type "help" for help.

#postgres=# ALTER USER [user name] WITH password '[password]';
postgres=# ALTER USER ubuntu WITH password '[password]';
ALTER ROLE
postgres=# ALTER USER ubuntu CREATEDB;
postgres=# \q

Now we create this db in advance. It suppose to be done by rake db:migrate/ect but due to some privilege issue we have to run following commend

#sudo -u postgres createdb [db name] --owner [user name]
#to be precise, we will run
sudo -u postgres createdb myapp_development --owner [user name]
sudo -u postgres createdb myapp_test --owner [user name]
#because name of db used by app is myapp_development and myapp_test 

rake db:setup
rake db:migrate
rake db:seed
rails server -b $IP -p $PORT

remember to run following command after switching branch

rake db:setup
rake db:migrate
rake db:seed

Previous Group Link

http://medicalpersistencesystem2020.herokuapp.com/

About

CSCE 606 Project for Medical Persistance System

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 53.6%
  • Haml 28.2%
  • Gherkin 7.9%
  • HTML 6.6%
  • SCSS 3.0%
  • JavaScript 0.4%
  • CoffeeScript 0.3%