This is a simple (and currently unfinished) web app meant to demonstrate the kind of website that's made possible through interaction with CMS's DEL on FHIR.
You can see it up and running at https://deldemo.herokuapp.com
These installation instructions may seem verbose as they were written to be accessible to most anyone. It should go quickly if you already have the necessary tools installed and follow the jumps provided!
It is most likely the case that these steps are incredibly similar for all other unix based operating systems
-
Open Terminal
-
Check if you have Git installed by inputting:
git --version
-
Check if you have Homebrew installed by inputting:
brew -v
-
If Homebrew is already installed, Terminal should output something like:
Homebrew 2.1.7-16-gbf0f1bd Homebrew/homebrew-core (git revision 6cc9b; last commit 2019-07-16) Homebrew/homebrew-cask (git revision 177ff; last commit 2019-07-16)
Jump to step 5 if this is the case.
-
If Terminal responded with anything that might indicate it did not recognize Homebrew, such as:
-bash: brew: command not found
continue to step 4.
-
-
Install Homebrew by inputting:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
brew install git
-
Configure Git to match your Github account:
git config --global user.name "YOUR NAME" git config --global user.email "[email protected]"
(Don't have a Github account? Register here then run the above commands)
-
Create a new directory to store this web app. Feel free to put this directory wherever makes sense. For the sake of simplicity, the following commands will create it directly in the home directory:
cd ~ mkdir delDemo
-
Clone the DEL Demo repository into your new directory by inputting:
cd delDemo git clone https://github.com/paciowg/delDemo.git
-
Check if you have Rails installed by running:
rails -v
-
Check if you have Ruby installed by inputting:
ruby -v
-
If Ruby is already installed, Terminal should output something like:
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
Jump to step 14 if this is the case.
-
If Terminal responded with anything that might indicate it did not recognize Ruby, such as:
-bash: ruby: command not found
continue to step 11.
-
-
Check if you have the Ruby Version Manager (RVM) by inputting:
rvm -v
-
If RVM is already installed, Terminal should output something like:
rvm 1.29.9 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
Jump to step 13 if this is the case.
-
If Terminal responded with anything that might indicate it did not recognize RVM, such as:
-bash: rvm: command not found
continue to step 12
-
-
\curl -L https://get.rvm.io | bash -s stable
If it asks for your password, provide it. Once downloading RVM, you will need to close and reopen Terminal. Input:
exit
Then close Terminal, and open Terminal again.
-
rvm install ruby-2.6.3
-
First, input the following to ensure that Ruby's package manager RubyGems is up to date:
gem update --system
Then, install Rails by running:
gem install rails
-
Set up your local instance of the app.
First, make sure you're in the correct directory (Remember to change the cd path if you chose to set up the app in a different location):
cd ~/delDemo
Next, ensure you have the Bundler gem installed by inputting:
gem install bundler
Finally, use Bundler to install the DEL Demo's gems:
bundle install
-
Check if you have PostgreSQL installed by inputting:
postgres --version
-
Install PostgreSQL by inputting:
brew install postgresql
-
Create and migrate the (largely unused) DEL Demo dev db
rake db:create:all rake db:migrate
Once installation is complete, you can run the app by following these steps:
-
Open Terminal
-
Make sure your working directory is where the app is stored. If you followed the MacOS installation directions above with no variation, inputting the following will get you there:
cd ~/delDemo
If that is not where your delDemo directory is, instead input
cd <path>
where<path>
is the path to your delDemo directory. -
Start up the PostgreSQL server by inputting:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
-
Tell Rails to start up a Puma server by inputting:
rails server
-
The DEL Demo should be running! Open a browser (I suggest Chrome) and type the following into the address bar:
localhost:3000
-
When you're done using the app, you need to make sure the server stops running. To do this gracefully, you need to do two things:
-
First, go back to your Terminal window and stop Puma by using the hotkey:
control-C
-
Then, stop the PostgreSQL server by inputting:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop
-
Copyright 2019 The MITRE Corporation