This project is built with :
- ruby 2.1.1 (mentioned in the Gemfile)
- rails 4.1.0 (rc2 for now)
- slim instead of erb/haml
- postgres 9.x
- bourbon instead of bootstrap/foundation
- phantomjs (use
brew
to install) for integration test driver- Please make sure your phantomjs brew package is up2date:
brew update && brew upgrade phantomjs
- Please make sure your phantomjs brew package is up2date:
- poltergeist for phantomjs driver
Follow these steps in order please:
- Clone the project
bundle install
- Setup your
config/database.yml
based offconfig/database.example.yml
(cp
it)
- If you are using vagrant (which already has postgres on it): please remove
host: localhost
from both thedevelopment
andtest
db settings. Also, please addusername:
andpassword:
as empty keys under both sections.
bin/rake db:setup
- Setup new DNS Alias for
localhost
:
- From your terminal, type in
sudo nano /etc/hosts
(Mac/Linux Only) - Note: if you are using a VM (Vagrant, etc), this should be done on your host (main) machine, not your virtual machine
- Add the following entry as a new line at the end of the
/etc/hosts
file:127.0.0.1 compass.dev
. - Now you can go to the URL
http://compass.dev:3000/
instead ofhttp://localhost:3000/
for when you are working on this app.
- Setup a
.env
file based on.env.example
in the project root:cp .env.example .env
- Create a Github App (see steps below)
- Start the server, using the
bundle exec guard
or thebin/rails server
command
User (student/teacher) Authentication can only happen through Github. Much like how Facebook has Apps that you need if you want to allow users to login through Facebook, we need to create an "app" on Github).
- Create a Github application on your Github profile (for your dev environment): https://github.com/settings/applications/new
- Specify
http://compass.dev:3000/auth/github/callback
as the Callback URL (when they ask you) - After the app is created, it gives you some keys. Add the OAuth client ID and client secret as
GITHUB_KEY
andGITHUB_SECRET
to your.env
file - Kill and Restart your local server (
guard
orrails s
or whatever) if running
Use guard to start the server and run the tests: bundle exec guard
Alternatively, you could start the server using: bin/rails s
and run the tests using bin/rake spec
At the moment, this project is managed via a Public Trello Board
https://github.com/wingrunr21/flat-ui-sass was used to convert FlatUI Pro from LESS to SASS (located in vendor/assets
)
Ask the teachers for the activites_seed.rb
which has some activities that can be populated by the bin/rake db:seed
command. They will send you a gist with the rb file in it.