Skip to content

Commit

Permalink
[CHORE] Add CIC installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
zdavis committed Nov 10, 2015
1 parent e3e80bd commit 42c2d9b
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,47 @@ While there may be parts of this API that will become stand-alone components, it

The following instructions assume that you have Ruby 2.2.2 installed, a working Bundler executable, and a Postgres database.

```bash
git clone git@github.com:ManifoldScholar/manifold-api.git
*Before doing anything:*

- Ensure that /opt/boxen/config/nginx/sites/manifold-api.conf doesn't exist.
- Ensure that you have Intellij 15 with these JetBrains plugins: Ruby, NodeJS
- Ensure that you don't have an existing ~/src/manifold dir. Get rid of ~/src/manifold-api if you have it.

*First, setup Ruby and Gems.*

```
boxen manifold
cd ~/src/manifold
# IF THIS DOESN'T RETURN A STRING THAT STARTS WITH ruby 2.2.3, YOU HAVE A RUBY BUILD PROBLEM. FIX IT.
ruby -v
gem install bundler
# IF THIS DOESN'T RETURN /bin/rais, YOU HAVE A PATH PROBLEM. FIX IT.
cd api && which rails
bundle install
rails g manifold:install
rake db:create
rbenv rehash
```

*Then setup your NPM modules*

```
cd ~/src/manifold/client
npm install
```

*Then setup the rails DB and ingest some texts*

```
cd ~/src/manifold/api
rake db:migrate
./bin/puma -C config/puma/docker.rb
rails g manifold:install
# THERE'S A WEIRD SPRING ISSUE, MAYBE BECAUSE WE'RE ON EDGE RAILS
spring stop && rake ingest:specpubs
```

At Cast Iron, we tend to run Rails apps on UNIX sockets proxied by Nginx. The default development server config at config/puma/development.rb is confiugred to work with Boxen. The Docker config file will run the app on http://localhost:3001.
*Open the project in your IDE*

- Open intellij. Click "open" and open the manifold directory.
- Start the client and API servers

## Text Ingestion

Expand Down

0 comments on commit 42c2d9b

Please sign in to comment.