run MacOS - jcheype/NabAlive GitHub Wiki
Running the stack locally (MacOS)
Pre-requisites
(Commands are given assuming an MacOS 10.7 machine)
Xcode is installed (Available on the mac Appstore for free)
Lasted Java for Mac OS X 10.7 Developer Package is installed (Available at Downloads for Apple Developers)
Server side
For install needed package you need Homebrew
Install-it with /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
MongoDB
The data is stored in Mongo DB, so you'll need to install it too: brew install mongodb
.
MongoDB listens to 127.0.0.1
only by default. The Java components are connecting to localhost
. Depending of your system configuration localhost
can mean different things. If you encounter connection issues while building the Java components try:
- Edit your MongoDB configuration (
/usr/local/Cellar/mongodb/2.0.2-x86_64/mongod.conf
) and comment thebind_ip
line, then restart MongoDB. It should now listen on all interfaces and connection should succeed regardless of the IP address used. (Warning: Keep in mind that anybody can connect to your mongodb server with this solution)
Java
To build the Java components, you'll need Maven: brew install maven
Front side
Rake & Ruby stuff
Rake is already installed with MacOS
You'll need the haml Gem to compile haml
templates: sudo gem install haml
Jammit is needed to package assets: sudo gem install jammit
FSSM is needed to monitor changes in the Web front-end files and recompile everything: sudo gem install fssm
.
NodeJS
You will need NodeJS : brew install node
Follow informations display for NODE_PATH
You will need Coffee Script : brew install coffee-script
You'll also need the NodeJS Package Manager (npm
) to be able to compile Less CSS files :
curl http://npmjs.org/install.sh | sh
cd /usr/local/lib/node_modules/
npm install less
We also need to add a symbolic link to /usr/local/bin
cd /usr/local/bin
ln -s ../lib/node-modules/less/bin/lessc leesc
Building the web front-end
Go to the web-front/
folder and use: rake
.
Building the Java components
Go to the root folder, and: mvn clean install
.
Running
To start the mongodb server: mongod run --config /usr/local/Cellar/mongodb/2.0.2-x86_64/mongod.conf
To start the whole stack: mvn -f web/pom.xml exec:java -DfrenchTtsUrl=http://localhost/
If you have a issue with groovy about "apps.folder" try to launch the server with apps.folder pointing to an existing empty directory.
mvn -f web/pom.xml exec:java -DfrenchTtsUrl=http://localhost/ -Dapps.folder=/User/XXXX/Documents/XXXX/
(TODO: Document the frenchTtsUrl
property.)
This will start a webserver on port 8999
. Try http://localhost:8999/index.html
You can also start rake
on a separate terminal to monitor your changes in the front-end code and re-publish them:
cd web-front/
mkdir public
rake watch