This is the final project for the 2019-2020 Carrot U session. It will manage students, mentors, and sessions of the course.
This pulls the source code for the app to your laptop.
% cd # go to your home directory
% mkdir git # create a directory for git (if needed)
% cd git # go into the git directory
% git clone https://github.com/carrot-u/carrot-u-admin-app/ # check this repo out from gitThis pulls all the gems (shared libraries) needed by the app to your machine.
% cd carrot-u-admin-app # go into the source directory
% bundle installYou may get some error messages about the version of bundler, needing to update yarn,
etc. These should give you instructions about what needs to be done to fix the errors,
just follow those and ask in the #carrot-university channel if you can't resolve the
problem.
You should have already installed Postgres during the setup for the course, but you need to create the database for the project.
Create the database:
% createdb carrot_u_admin # run the postgres command to create the dbRun the migrations:
% rake db:migrateThere is an Okta certificate that you can use locally pinned in the #carrot-university channel. Create a /conf
directory in your repo and add this certificate into that directory. For example, if you have downloaded to your
Downloads directory:
% mkdir conf # create the conf directory in ~/git/carrot-u-admin-app
% cd conf # go into the conf directory
% cp ~/Downloads/okta.cert . # copy the downloaded cert into this directory
% cd .. # move back to the main source code directoryHeroku is the cloud platform we will be running the app on. You can deploy to it
using git, with some setup work.
Detailed instructions are here.
Simple instructions below.
Install Heroku command line (CLI) with brew:
% brew tap heroku/brew && brew install herokuConnect to the Heroku app:
% heroku git:remote -a carrot-u-admin # this tells git where your heroku app livesFor setup this is all you need to do, but now you can push code to Heroku, run db migrations, and launch the app. See the Heroku docs to learn more about using Heroku.
You can run locally using rails:
% rails sThis allows you to access your local version of the app at http://locahost:3000/
Use this when developing code.
You can launch the Heroku app using the Heroku command line:
% heroku apps:open # this will open the app URL in your default browseror you can just browse to https://carrot-u-admin.herokuapp.com/
Use this to see what the current master branch of the code looks like.
Note that we are connecting to this app using Okta, so the version running on Heroku will also appear on your Okta home page - look for "Carrot U".