BeaverCounseling Application will enable OSU Cascades Counseling Clinic clients to fill out and sign clinic forms digitally. This data will be stored electronically, allowing clinic staff to search and access client information.
Before running this web app you will need to install rails 5.1.4 and ruby 2.4.2. You will also need to install PostgreSQL.
$ xcode-select --install
Check if Homebrew is installed:
$ brew
-bash: brew: command not found
To avoid RVM installation issues, install Homebrew before RVM. If Homebrew is not installed, install it:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The RVM website explains how to install RVM. Here’s the simplest way:
$ \curl -L https://get.rvm.io | bash -s stable
For more install information checkout: https://rvm.io/rvm/install
After installing RVM, install the newest version of Ruby. You must specify a version number to install the newest stable Ruby version:
$ rvm install ruby-2.4.2
At the time we made the app the most recent version was rails 5.1.4
$ gem install rails
You will also need to download PostgreSQL. We used the Graphical Installer which can be found at: https://postgresapp.com/
You can also download manually via: https://www.postgresql.org/download/
Once you have downloaded Ruby, Rails, and PostgreSQL you can now begin.
Go ahead and clone the repo
$ git clone https://github.com/osu-cascades/beaver-counseling
$ cd beaver-counseling
Next, run bundle install to download the necessary gems
$ bundle install
You will need to create to database
$ rake db:create
You will then need to migrate the database
$ rake db:migrate
Then create the initial admin run the db:seed command
$ rake db:seed
Finally start the server
$ rails server
Then open a web browser with the web address localhost:3000 to see the app running.
We are using Google Cloud Platforms' App Engine to host the application. Hosted at: http://cascadesclinic-197917.appspot.com/
To deploy to GCP a more comprehensive guide can be found at: https://cloud.google.com/ruby/rails/using-cloudsql-postgres
Simplified steps:
-
Get access to project
-
Download Google Cloud SDK
-
Run
$ gcloud app deploy --version dev
- Run any migrations with
$ bundle exec rake appengine:exec -- bundle exec rake db:migrate
- View website using
$ glcoud app browse
Make sure you have a "staging" and "production" remote for Heroku
git remote -v
What gets pushed to git can also get pushed to Heroku.
git push -f [staging/production] [master/development]
View Heroku env vars
heroku config --remote [production/staging]
Add or remove Heroku env vars
heroku config:[set/unset] [var to set/unset]=[value to set] --remote [production/staging]
Run rake commands on the Heroku db
heroku run rake db:migrate --remote [production/staging]
Copyright © 2017 OSU Cascades. All rights reserved.