Skip to content
A web application to create and conduct surveys
Ruby CoffeeScript JavaScript
Pull request Compare This branch is 227 commits behind nilenso:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db
deploy
doc
lib
log
public
script
spec
vendor
.gitignore
.rbenv-version
.rspec
.travis.yml
Gemfile
Gemfile.lock
Guardfile
Procfile
README.md
Rakefile
config.ru

README.md

survey-web Build Status

A web application to create and conduct surveys

Terminology

  • Survey - Collection of Questions
  • Question - A specificaton for a piece of info that the survey designer wants to collect.
  • Answer - A piece of information for a question
  • Response - The set of a user's answers for a particular survey

Setup

Database

  • You need to set up a local database. Any of the databases supported by Rails will work, but PostgreSQL is recommended.
  • Some tutorials are here and here. If you're on a mac, use Heroku's Postgres.app
  • Make a copy of the database.yml.sample provided (in the config directory); name it database.yml
  • Fill in the details for your database.

For example, the database.yml will look something like this if you're using Postgres.app:

development:
  adapter: postgresql
  encoding: utf8
  database: survey_web_dev
  pool: 5
  username: 
  password: 
  host: localhost

test:
  adapter: postgresql
  encoding: utf8
  database: survey_web_test
  pool: 5
  username: 
  password:
  host: localhost

production:
  adapter: postgresql
  encoding: utf8
  database: survey_web_prod 
  pool: 5
  username:
  password:
  • Navigate to the survey-web directory from a terminal.
  • Type rails server
  • If the server starts up without complaining, your database is set up correctly.

Gems

  • To install all the libraries required by this application, navigate to the survey-web directory from a terminal.
  • Type gem install bundler and then bundle install

OAuth Provider

This app works with an OAuth Provider that you'll need to set up as well. You can clone it at http://github.com/c42/user-owner

  • Login as super_admin in the user-owner app
  • Click on Add a new application
  • The redirect uri would be http://SURVEY_WEB_URL/auth/user_owner/callback (SURVEY_WEB_URL is the URL where the survey-web app is hosted)
  • You will then have the Application ID and the Secret.
  • Create a config/application.yml file in this (survey-web) app

  • Add the following to it:

OAUTH_ID: # Application ID of the OAuth provider.
OAUTH_SECRET: # Secret of the OAuth provider.
OAUTH_SERVER_URL: # URL where the OAuth Provider instance is hosted.

Finally...

Start the survey-web app by typing rails server from the console.

Troubleshooting

Please check the Troubleshooting section of the wiki, or create an issue if you need any help.

Contributing

  • We use Pivotal Tracker to manage our projects. You can have a look at the bugs and features that you could work on.
  • If you need any help, mail us at survey@c42.in.

Other Notes

Setup delayed_job to Upload Photos to Amazon S3

  • If delayed_job workers aren't running, photos will stay on the app server, and will not be migrated to S3.
  • Setup Carrierwave with your Amazon S3 credentials.
  • Start delayed_job workers using script/delayed_job. Look here for documentation.
  • If you're deploying to EngineYard, a deploy hook is provided in deploy/after_restart.rb.
Something went wrong with that request. Please try again.