-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Survey Sett is a Rails app designed for creating web based surveys. It is not an out of the box solution and does require some programming knowledge, with that however there comes a flexibility which may not be possible with out of the box solutions.
The code was originally written by Craig Thomson at The University of Aberdeen in order to do a recall experiment, some design decisions are therefore based on that experiment although it is possible to change any behavior. The idea of making this a public git repo is to collaborate with other students (and anyone else) to try and make a useful and reusable survey web app.
It is designed to be deployed on Heroku, it can be run on many other platforms but any documentation which I get round to will focus on Heroku.
It is also setup for running on postgresql and you will need that setup if you wish to run locally. Alternatively you can configure with SQLite (or any other DBMS, see the Rails docs for how to do that).
The code was originally run on Ruby 2.4.1, I strongly advise you setup Ruby with RVM. You will also require bundler and eventually possibly a JS environment (like nodejs). At this point I do not have the time to step by step through this and am going to broadly assume people using the software know enough about the tools to lookup the documentation and install all of this themselves. In short you need:
- Postgresql (by default this app uses the postgres user with password "postgrespassword", go into config/database.yml to change that)
- The Heroku command line tools (for deployment)
- git
- Ruby (pref with RVM)
- Bundler
- You will probably need the Posgresql dev package (libpq-dev) on Debian/Ubuntu/Mint systems
- clone this repo from git
- in the terminal, go to the application directory
bundle install
- there is a shell script reset_db.sh (open it and look at it, these are the 4 commands with which you drop, create, migrate and seed the database, either run them one by one, or do
sh reset_db.sh
- start the server
rails s
- this should start a web server on localhost:3000
- at the moment it is a case of look at the code and see how to change it.
- the experiment creation is handled in db/seeds.rb
- this shows a simple experiment / consent setup with obvious strings you can change
- there is some code below which in combination with some ORM objects in /app/models shows how you can do some more complex stuff.
- a participant of your survey is tracked via session cookies, so that one person will be able to do it once per device. Of course if they use an incognito window they can do it multiple times, there is not much that can be done about this without collecting emails or IP (and adjusting any ethical paperwork). This whole thing is designed to be as ethically simple as possible. Clear instructions, no personal data.
- not everything works yet, this is a work in progress
- this system is designed to be "back button proof" although there is currently a bug which takes you back to the last statement (not question) sometimes. I am working on this.
I will add more functionality and more detailed instructions as I can.