Peer Group Supervision enables professionals to help each other.
This is the first version, heavy alpha.
-
Install required gems
bundle install # If you are using rvm, create new gemset to not mess with your default gems
-
Setup configuration files
cp config/redis.yml.example config/redis.yml cp config/database.yml.example config/database.yml
-
Install Redis
(download from http://redis.io/download) - tested on 2.0 and 2.2 stable releases
-
Setup database
bundle exec rake db:setup
-
Start application:
foreman start
-
Run node server
# Instructions for installing node can be found at https://github.com/wolfgangihloff/peergroup-node node server.js
-
Open localhost:3000
As with test database, make sure that you run your tests on separate Redis database, as this will flush you data before tests.
Unfortunately Redis gem uses default url for connection (redis://localhost:6379), so if you don’t provide proper config (or use older gem than from master repository for Redis in case of unix socket), then instead of connecting to test database, your test environment could connect to other database and flush it all.
You have been warned!
-
Install required gems
bundle install
-
Setup database number in config/redis.yml or run separate redis server like this:
redis-server config/redis-test.conf
-
Run Node server instance
REDIS_DB should be number that you specified in config/redis.yml REDIS_DB=1 PGS_PORT=3666 node app-node/server.js Eventually you can connect to separate instace of redis server (if running) REDIS_DB=1 REDIS_PORT=6380 node app-node/server.js
-
Run tests:
bundle exec rake spec
Note: If you encounter error during requests specs: Selenium::WebDriver::Error::ObsoleteElementError, try to use wait_until method.
Currently, the application is available in 2 languages: English and German. Default locale is set during the application boot, but is's possible to switch to different locale while application is running - just click link with locale name in the header. To add missing translation for non-default locale:
-
import all keys from primary locale file: rake tolk:sync
-
importing non-primary locales: rake tolk:import
-
start application in development mode, open up localhost:3000/tolk
-
find your missing translation by english phrase or key without first part, so if you see: “translation missing for key en, supervisions, show, title”, then you need to search for “supervisions.show.title” key
-
edit, and save, and when ready dump your translations: rake tolk:dump
To change the default locale edit aprropriate line in the environment file config/environments/production.rb or config/environments/development.rb. The line looks like: # I18n.default_locale = :en Other localized files are: * app/views/pages/_about.<locale>.html.haml * app/views/pages/_help.<locale>.html.haml * README / LIESMICH
It’s possible to run application on heroku.
To have your own instance on heroku:
-
Install heroku client
gem install heroku
-
Create application
heroku create --stack cedar my-peergroup-app-name
-
Setup configuration variables
heroku config:add NODE_PORT=80 NODE_USERNAME=node NODE_PASSWORD=secret NODE_PROTOCOL=http # NODE_USERNAME/NODE_PASSWORD - credentials that will allow node server to connect
-
Add redis addon
heroku addons:add redistogo:nano
-
Deploy code
git push heroku master # Refer to heroku [docs](http://devcenter.heroku.com/articles/rails31_heroku_cedar) for more informations.
-
Setup node server using REDISTOGO_URL - github.com/wolfgangihloff/peergroup-node#readme
It’s also possible to run application on Your own server.
-
Install passenger gem
gem install passenger
-
Install passenger
passenger-install-apache2-module #or to install with nginx passenger-install-nginx-module
-
Follow installer instructions.
-
Install bundler & required gems gem install bundler bundle install
-
Setup configuration files
cp config/database.yml.example config/database.yml cp config/redis.yml.example config/redis.yml # Note: passenger by default runs in production mode, so either change database settings or run in development mode.
-
Setup database
bundle exec rake db:setup
-
Run node server
# Instructions for installing node can be found at https://github.com/wolfgangihloff/peergroup-node node server.js
-
Open Your page
Sometimes in production environment, there is an error with sass-cache:
Errno::EDQUOT: Disk quota exceeded - app_path/tmp/sass-cache/(...)
You can fix it by running:
bundle exec compass compile -e production --force
MIT License. Copyright © 2011 Wolfgang Ihloff