Welcome to our Sambal project. We have high ambitions, but first, we need to setup our computers :)
Install Ruby and Rails
We are using Ruby 2.2.0 and Rails 4.2.0. Install the same version (it should be the latest one).
Unfortunately, it is a bit hard to develop Rails in Windows (buy a Mac people), but you can try RailsInstaller or Nitrous.io (virtual machine).
Install Nodejs
Test installation by typing node -v
in terminal/command line. It should output the version.
Install Git
For windows users, when given the option git Bash only, windows command prompt, or linux tools on command prompt, choose windows command prompt.
Test installlation by typing git -v
in terminal/command line. It should output the version.
Install compass
gem install compass
Install grunt and bower
npm install -g grunt-cli
npm install -g bower
Add your ssh keys to Github
For Windows users, you will have Git Bash after you install Git. I highly recommend using Git Bash and not the Windows command line
Clone the repo using ssh
git clone git@github.com:vanblaze/sambal.git
Install app dependencies
Inside the samabal
folder, run:
bundle install
then cd to the ng-app
folder and run:
npm install && bower install
You should be all set! Open two terminal tabs, cd into sambal directory and run rails s
on one tab. cd into ng-app directory and run grunt serve
. Now you have the app running on your machine!
cd to sambal directory, using terminal/command prompt/cygwin:
Install gems:
bundle install
If you ran "db:migrate" before, reset database. Do so by:
rake db:reset
Migrate your model to your database. Do so by:
rake db:migrate
Populating university database:
rake csv_model_import[universities.csv,University]
Start rails local back-end server:
rails s
In a browser, open (http://localhost:3000/)
On a new terminal tab/window, cd into ng-app directory
Install all front-end dependencies:
npm install && bower install
Start local front-end server:
grunt serve
In a browser, open http://localhost:9000/app/