Here's what you need on your workstation to work on both the api and the iOS app:
-
XCode and Command Line Tools
-
Ruby 1.9.3
curl -L https://get.rvm.io | bash -s stable rvm install 1.9.3 rvm use 1.9.3
-
Homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
-
A bunch of other packages
brew install git brew install scala --with-docs brew install mongo && mongod & gem install heroku-toolbelt gem install foreman gem install cocoapods && pod setup
Make sure you've got Mongo running, and just execute:
rake
Use sbt for local development on port 8080:
./sbt container-start
Or use foreman to start the bundled app via Procfile
on port 5000:
foreman start
In order to be able to push to Heroku, you need to add it as a remote repo to your git config:
heroku git:remote -a ambient-api
Given you've been granted the apropriate permissions, you can then deploy the app:
rake deploy
In order to get access to the Facebook SDK docs from within XCode, download and install the SDK.
JRebel can be set up with sbt so that code changes can be reloaded without server restarts.
-
Unpack and run
bin/jrebel-config.sh
-
Select "myJRebel" option in GUI
-
Grab authentication token from website (via "Activate JRebel" link) and paste into GUI
-
Add following line to your
~/.bash_profile
export SCALATRA_JREBEL="tools/jrebel/jrebel.jar"
-
Clean up:
rm -rf ~/.jrebel
Note: I'm actually not sure if steps 2 -5 are really necessary.
In order to get JRebel to automatically reload changed code, start the app like this:
./sbt
container-start
~ copy-resources