Skip to content

peergroup is a RoR application to allow a group of colleagues to share problems and ideas in a closed group to grow as professionals.

Notifications You must be signed in to change notification settings

wolfgangihloff/peergroup

Repository files navigation

Welcome to Peer Group Supervision

Peer Group Supervision enables professionals to help each other.

Updates

This is the first version, heavy alpha.

Running the application

  1. Install required gems

    bundle install # If you are using rvm, create new gemset to not mess with your default gems
    
  2. Setup configuration files

    cp config/redis.yml.example config/redis.yml
    cp config/database.yml.example config/database.yml
  3. Install Redis

    (download from http://redis.io/download) - tested on 2.0 and 2.2 stable releases
  4. Setup database

    bundle exec rake db:setup
    
  5. Start application:

    foreman start
    
  6. Run node server

    # Instructions for installing node can be found at https://github.com/wolfgangihloff/peergroup-node
    node server.js
    
  7. Open localhost:3000

Running tests

BIG WARNING:

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!

  1. Install required gems

bundle install
  1. Setup database number in config/redis.yml or run separate redis server like this:

redis-server config/redis-test.conf
  1. 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
  1. Run tests:

bundle exec rake spec

Note: If you encounter error during requests specs: Selenium::WebDriver::Error::ObsoleteElementError, try to use wait_until method.

Translations

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:
  1. import all keys from primary locale file: rake tolk:sync

  2. importing non-primary locales: rake tolk:import

  3. start application in development mode, open up localhost:3000/tolk

  4. 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

  5. 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

Deploying

Heroku

It’s possible to run application on heroku.

To have your own instance on heroku:

  1. Install heroku client

    gem install heroku
    
  2. Create application

    heroku create --stack cedar my-peergroup-app-name
  3. 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
  4. Add redis addon

    heroku addons:add redistogo:nano
  5. Deploy code

    git push heroku master
    
    # Refer to heroku [docs](http://devcenter.heroku.com/articles/rails31_heroku_cedar) for more informations.
    
  6. Setup node server using REDISTOGO_URL - github.com/wolfgangihloff/peergroup-node#readme

Passenger

It’s also possible to run application on Your own server.

  1. Install passenger gem

    gem install passenger
    
  2. Install passenger

    passenger-install-apache2-module #or to install with nginx
    passenger-install-nginx-module
  3. Follow installer instructions.

  4. Install bundler & required gems gem install bundler bundle install

  5. 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.
  6. Setup database

    bundle exec rake db:setup
    
  7. Run node server

    # Instructions for installing node can be found at https://github.com/wolfgangihloff/peergroup-node
    node server.js
    
  8. Open Your page

Known bugs, issues

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

License

MIT License. Copyright © 2011 Wolfgang Ihloff

About

peergroup is a RoR application to allow a group of colleagues to share problems and ideas in a closed group to grow as professionals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published