A web application to create and conduct surveys
- 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
- 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.sampleprovided (in the
configdirectory); name it
- 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.
- If the server starts up without complaining, your database is set up correctly.
- To install all the libraries required by this application, navigate to the survey-web directory from a terminal.
gem install bundlerand then
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
SURVEY_WEB_URLis 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.
Start the survey-web app by typing
rails server from the console.
- 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
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.
Carrierwavewith your Amazon S3 credentials.
script/delayed_job. Look here for documentation.
- If you're deploying to EngineYard, a deploy hook is provided in
Setup organization deletion
- Organizations can be (soft) deleted on user-owner
rake db:remove_deleted_organizations_dataon survey-web will delete all data (surveys, questions, responses etc.) belonging to any soft-deleted organisations
- Run it in a cron job so that this cleanup doesn't have to happen manually (although it is delayed)
Setup Logentries on Engineyard
To include unicorn and nginx config files as well, follow the instructions provided by EngineYard to upload a custom recipe, but replace configure.rb with the contents of this gist.