kjayma / surveyor_gui Goto Github PK
View Code? Open in Web Editor NEWAn extension to nubic/surveyor that adds reports and a forms to build surveys
License: MIT License
An extension to nubic/surveyor that adds reports and a forms to build surveys
License: MIT License
I made an initial attempt here, by simply commenting out a few lines of code. I'm currently able to run the rake tasks, create and fill out a survey.
Do this gem have ability to make survey from templates?
I've just install Surveyor gem in my application ruby 2.2.2 rails 4.2.6 with gem pundit. And have an issue: when i'm trying to visit /surveys path it raise an error from pundit:
Pundit::AuthorizationNotPerformedError at /
SurveyorController
{"controller"=>"surveyor", "action"=>"new"}
How should I add pundit verification on action in surveycontroller?
what about changing the question type selection from radio buttons to a select to be much more compact?
I create a question that contains a slider, with a question title of "How was your day? (1-100)":
After I add a conditional to the question, it has turned into a dropdown select and also, the question title has also changed to "How was your day? (1-29)":
This effect also happens even if I go into add logic, but I don't save the logic.
If I go to take the survey right now, it will show up as a dropdown.
If I come back in to examine the question, it appears that the logic remains:
If I click save here, it shows up as a slider again.
I've been getting around this bug by creating a question but not specifying it as a slider. I would then add the logic to the question prior to assigning it as a slider question.
i see surveyor supports translations, but haven't looked at that yet.
would be nice, in the future, to support them.
I'm not sure if cloning is fully supported or not, as it said the cloning feature was pending in the readme.
In a survey that has been created through the GUI, conditional logic doesn't persist if that survey is cloned. So for example, I've created a survey of several sections, each containing questions with conditional logic. If I clone that survey, all of those dependencies disappear.
Using ruby 2.1.4 and rails 4.1.0 if that helps.
Hello, first of all thanks so much for this great gem, it's been a huge time saves in a lot of aspects so far for my current project.
The only issue I have come across so far deals with generating reports. We have done a small launch for our application, and got 500 users to take surveys.
The issue: the surveys with 400-500 responses take too long to create a report. Greater than 30s, the default timeout time. Our hotfix solution is to cache the reports generated, and kill the cache every 20 responses or so.
I believe the generate_report method is the culprit, with all of those joins.
I wanted to open up this issue to see if anyone else has come across this. I will be attempting a solution in the coming weeks :) Any feedback or help would be wonderful!
engine migrations should stay inside db/migrate/
so, on engine updates, we can install the new ones with rake railties:install:migrations
.
also looks like the migration installer could be simplified because each file has the correct date, unlike surveyor.
i can look at this later
When I try to add a multiple choice question to a survey I get the following error message:
ActiveRecord::StatementInvalid (PG::GroupingError: ERROR: column "answers.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "answers".* FROM "answers" WHERE "answers"."question...
^
: SELECT "answers".* FROM "answers" WHERE "answers"."question_id" = $1 GROUP BY text ORDER BY display_order, display_order DESC
Using Ruby 2.1.2, Rails 4.0.8, pg 0.17.1 and Postgres 9.3.1 on OSX Mavericks.
I don't get this error when I use SQLite.
Hi,
i'm evaluating to extend this project for my surveyor admin interface instead of starting from scratch.
Would be nice to have this working with the edge surveyor code (with rails 4 support).
Any experience/interest on this?
i see surveyor_gui
is loading surveyor
CSS and all the stuff.. is this really needed?
i think this can be a problem... for example i have some branding/customization on the surveyor side and this is messing with the gui styles..
maybe loading surveyor_gui_all
on the layout instead of application
can be a good default choice?
this is strange... in my app, in development when i change something i need to restart the app, otherwise i get errors like:
Circular dependency detected while autoloading constant Survey
activesupport (4.0.5) lib/active_support/dependencies.rb:461:in `load_missing_constant'
activesupport (4.0.5) lib/active_support/dependencies.rb:184:in `const_missing'
[...]/bundler/gems/surveyor_gui-b9a6245d714c/app/models/surveyform.rb:1:in `<top (required)>'
activesupport (4.0.5) lib/active_support/dependencies.rb:424:in `load'
activesupport (4.0.5) lib/active_support/dependencies.rb:424:in `block in load_file'
activesupport (4.0.5) lib/active_support/dependencies.rb:616:in `new_constants_in'
activesupport (4.0.5) lib/active_support/dependencies.rb:423:in `load_file'
activesupport (4.0.5) lib/active_support/dependencies.rb:324:in `require_or_load'
activesupport (4.0.5) lib/active_support/dependencies.rb:289:in `depend_on'
activesupport (4.0.5) lib/active_support/dependencies.rb:207:in `require_dependency'
[...]/bundler/gems/surveyor_gui-b9a6245d714c/lib/surveyor_gui/engine.rb:17:in `block (2 levels) in <class:Engine>'
[...]/bundler/gems/surveyor_gui-b9a6245d714c/lib/surveyor_gui/engine.rb:16:in `each'
[...]/bundler/gems/surveyor_gui-b9a6245d714c/lib/surveyor_gui/engine.rb:16:in `block in <class:Engine>'
activesupport (4.0.5) lib/active_support/callbacks.rb:397:in
or
Circular dependency detected while autoloading constant SurveyformsController
etc.
Not a urgent issue because this should not happen in production, but worth keeping in mind.
Hi Kevin-
Is it possible to add HTML support for answers? I've noticed that question text currently supports HTML, just not the answers.
Thanks!
according to http://guides.rubyonrails.org/engines.html this is not a mountable engine, so can't be mounted on a custom path, like:
mount SurveyorGui::Engine => "/survey_admin", as: "surveyor_gui"
Just a cosmetic thing.
$ rails g surveyor_gui:install
/home/faraazc/.rvm/gems/ruby-2.1.5/gems/surveyor_gui-0.1.2/app/models/surveyform.rb:1:in <top (required)>': superclass must be a Class (Module given) (TypeError) from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in
load'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in block in load_file' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in
new_constants_in'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in load_file' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in
require_or_load'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:317:in depend_on' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:233:in
require_dependency'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:24:in block (2 levels) in <class:Engine>' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:23:in
each'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:23:in block in <class:Engine>' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:441:in
instance_exec'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:441:in block in make_lambda' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:189:in
call'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:189:in block in simple' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in
call'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in block in simple' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in
call'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in _run_callbacks' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in
_run_prepare_callbacks'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in run_callbacks' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:83:in
prepare!'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:55:in prepare!' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/application/finisher.rb:50:in
block in module:Finisher'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:30:in instance_exec' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:30:in
run'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:55:in block in run_initializers' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:226:in
block in tsort_each'
from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:427:in
each_strongly_connected_component_from'
from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:347:in block in each_strongly_connected_component' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in
each'
from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in call' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in
each_strongly_connected_component'
from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:224:in tsort_each' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:205:in
tsort_each'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/initializable.rb:54:in run_initializers' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/application.rb:352:in
initialize!'
from /home/faraazc/rails/survey/config/environment.rb:5:in <top (required)>' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:92:in
require'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:92:in preload' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:143:in
serve'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:131:in block in run' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:125:in
loop'
from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application.rb:125:in run' from /home/faraazc/.rvm/gems/ruby-2.1.5/gems/spring-1.3.4/lib/spring/application/boot.rb:18:in
<top (required)>'
from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require' from /home/faraazc/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from -e:1:in `
Hi Team
I need your help in running the project .I have cloned the project and followed the instructions but I am unable to run Surveyor_gui.Can Surveyor_gui run independently or does it need to run along with the Rails app as install instructions are not clear
As per the customization documentation, I created my own surveyor_controller.rb
to specify use of the application layout. This broke the surveyor_gui js file on line 15.
surveyor_gui_mount_point = $("#surveyor_gui_mount_point").data("surveyor_gui_mount_point");
if (surveyor_gui_mount_point.length==0){
surveyor_gui_mount_point="/";
} else {
surveyor_gui_mount_point= surveyor_gui_mount_point.replace(/surveyforms/i, "");
}
It should be mentioned under Views in the readme, that when building your own layout, there needs to be an anchor point (#surveyor_gui_mount_point
) for the js file.
Updated: Also the data-attribute having underscores is non-standard. The default for HAML 4.0+ is dashes. To get the underscores, I had to put Haml::Template.options[:hyphenate_data_attrs] = false
into a config initializer.
I've programmatically pre-built the survey i'll need to manage with the gui (not with surveyor DSL).
One of the answers has also a text box (value is going into string_value
field), something like this:
question1 = section.questions.new
question1.text = "Question text"
question1.pick = :one
question1.display_order = 1
question1.save!
question1.answers.create(text:"select me")
question1.answers.create(text: "this has also a text box", response_class: :string)
Any advice how to do/implement this with the gui?
Maybe just adding an optional text field near answers?
Just realized that this model is included with surveyor_gui
, but surveyor_gui:install
does not seem to add any migration for it.
I just wanted to check on this - is there some sort of timeline when the mandatory feature is expected to be implemented?
I am using Rails 4.1.7 and Ruby 2.1.4. File upload and star rating shows up when creating the survey, but not when taking it, i.e. on /surveys.
I uploaded a sample Rails up at https://github.com/neuroinfo/surveying
Thanks for your excellent gem. Needed quick help. I am unable to override base layout of survey controller from gem surveyor. Because surveyor_gui is overriding surveyor_controller.rb and rendering layout named "surveyor_modified". Can you please check once and update me on this. I also tried by creating same folder hierarchy as in gem but it was taking layout "surveyor_modified" from gem.Below is the code for quick reference from surveyor_gui gem .
https://github.com/kjayma/surveyor_gui/blob/master/app/controllers/surveyor_controller.rb
def self.included(base)
base.send :layout, 'surveyor_gui/surveyor_modified'
end
When taking a survey, one one answer group is permitted due to uniqueness index on response sets. Users should be able to enter as many answers as they want.
Need a line space after "Possible Answers"
First of all, Thank you for your great efforts.
I am facing difficulty to override a haml file of surveyor gem, which is originally present inside partials folder of surveyor gem.
After including surveyor_gui, i am unable to override it.
File Name - _question_group.html.haml
File Location:
I tried many approaches to override it and also solutions in Stack overflow. But was not able to achieve it...Can you guide in right direction...Any ideas?
Thanks
can you please explain what parts of surveyor
is surveyor_gui
overriding (and why)?
just noticed some partials, module SurveyorControllerCustomMethods
and layouts/surveyor_modified
thanks!
I didn't see anything locally, but this is what happens when pushing to Heroku:
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `column_attributes' for #<struct PermittedParams params=nil>
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/lib/surveyor_gui/models/column_methods.rb:13:in `block in <module:ColumnMethods>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/concern.rb:120:in `class_eval'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/concern.rb:120:in `append_features'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/app/models/column.rb:2:in `include'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/app/models/column.rb:2:in `<class:Column>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/app/models/column.rb:1:in `<top (required)>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:360:in `require_or_load'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:317:in `depend_on'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:233:in `require_dependency'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:24:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:23:in `each'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/surveyor_gui-0.1.2/lib/surveyor_gui/engine.rb:23:in `block in <class:Engine>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:441:in `instance_exec'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:441:in `block in make_lambda'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:189:in `call'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:189:in `block in simple'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in `call'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in `block in simple'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in `call'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:190:in `block in simple'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_prepare_callbacks'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
remote: /tmp/build_7025e2961ac33212e9d88b2cedf49b95/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
I'm using 0.1.2
Having some troubles on logic with grids..
On the logic admin side looks like every row of the grid is treated as a single question.
for example i have this grid:
and the logic form looks like this:
Is this a surveyor limitation or is possible to reference the whole group/grid as a single entity here?
Then, on the frontend, if check the trigger answer on the first question (it's a simple pick one) i get this on the grid page
ActionView::Template::Error (uninitialized constant Surveyor::Models::DependencyMethods::B):
49: %span.help= a.help_text_for(@render_context, I18n.locale)
50: %th
51: - ten_questions.each_with_index do |q, i|
52: %tr{:id => "q_#{q.id}", :class => "q_#{renderer} #{q.css_class(@response_set)}"}
53: %th
54: = q.text_for(:pre, @render_context, I18n.locale)
55: = q.help_text_for(@render_context, I18n.locale)
app/views/partials/_question_group.html.haml:52:in `block (3 levels) in _app_views_partials__question_group_html_haml__2139141595446107674_2245346220'
app/views/partials/_question_group.html.haml:51:in `each'
app/views/partials/_question_group.html.haml:51:in `each_with_index'
app/views/partials/_question_group.html.haml:51:in `block (2 levels) in _app_views_partials__question_group_html_haml__2139141595446107674_2245346220'
app/views/partials/_question_group.html.haml:43:in `each_slice'
app/views/partials/_question_group.html.haml:43:in `block in _app_views_partials__question_group_html_haml__2139141595446107674_2245346220'
app/views/partials/_question_group.html.haml:3:in `_app_views_partials__question_group_html_haml__2139141595446107674_2245346220'
app/views/surveyor/edit.html.haml:17:in `block in _app_views_surveyor_edit_html_haml___241133071874636758_2244419220'
app/views/surveyor/edit.html.haml:9:in `_app_views_surveyor_edit_html_haml___241133071874636758_2244419220'
Any idea?
Looks like the surveyor gui is at "/surveyor_gui/surveyforms" instead of "/surveyforms" like the readme specifies. Perhaps just update the readme?
I'm using Rails 4.2, not sure if that messes with the routes (don't think it does).
Showing as a text field
just putting the idea here...
would be super nice to rewrite the admin interface to use a css framework like bootstrap or zurb foundation.
that would provide a solid, coherent and easy to customize gui and allow to remove ~600 custom CSS LOC.
simple_form
has out-of-the-box support.
I created a mandatory question, with two questions that display depending on the answer of the mandatory question. One of these two questions is itself mandatory, while the other is not mandatory:
When I select the answer that is expected to then display the non-mandatory subquestion, it works correctly. If I select the answer that is expected to display the mandatory question, the mandatory question does not appear:
Hi, I am trying to run the 'rails g surveyor_gui:install" command. I get the following error...
/Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/surveyor_gui-9278dfff115d/app/models/permitted_params_decorator.rb:1:in <top (required)>': uninitialized constant PermittedParams (NameError) from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/surveyor_gui-9278dfff115d/lib/surveyor_gui/engine.rb:24:in
block (2 levels) in class:Engine'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/surveyor_gui-9278dfff115d/lib/surveyor_gui/engine.rb:23:in each' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/surveyor_gui-9278dfff115d/lib/surveyor_gui/engine.rb:23:in
block in class:Engine'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:446:in instance_exec' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:446:in
block in make_lambda'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:192:in call' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:192:in
block in simple'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in call' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in
block in call'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in each' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in
call'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in __run_callbacks__' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in
_run_prepare_callbacks'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in run_callbacks' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/reloader.rb:83:in
prepare!'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/reloader.rb:55:in prepare!' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:50:in
block in module:Finisher'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in instance_exec' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in
run'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in block in run_initializers' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in
block in tsort_each'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in
each_strongly_connected_component_from'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in block in each_strongly_connected_component' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in
each'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in call' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in
each_strongly_connected_component'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in tsort_each' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in
tsort_each'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in run_initializers' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:352:in
initialize!'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in public_send' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in
method_missing'
from /Users/bmac/Projects/Professional/psiware/config/environment.rb:5:in <top (required)>' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:328:in
require_environment!'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:142:in require_application_and_environment!' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:128:in
generate_or_destroy'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:50:in generate' from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in
run_command!'
from /Users/bmac/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:4:in
require'
from bin/rails:4:in `
I am running rails v4.2.6 and ruby v2.2.3p173. Any thoughts on what may be wrong? I have also had some issues installing 'therubyracer' via my Gemfile, so I was going to tackle that next. Would the error above have anything to do with the lack of 'therubyracer'?
Thanks in advance!
Have been developing under sqllite. When switching to Postgres, surveyform_controller_spec.rb fails.
I think the survey clone is not implemented yet.
Btw, the right approach to editing a survey that has already some responses is to start a new clone?
In this case that's really important.
Hi Kevin -
While there is support for >, <, = dependency comparisons, are there any plans to add support for dependencies when it comes to summing responses? So for example, display question C if the sum of the answers to questions A and B sum up to 100.
since images were moved under /lib they are not precompiled anymore by default.
fix is to move them back to /app, or manually specify what to precompile
i am installing surveyor successful on rails 4.1.1 and work well , but when i'm install surveyor-gui it's require rails 4.0
can you modify gem dependency in your gemspec?
I am trying out surveyor-gui before incorporating it into an application, and after the basic question survey was completed, attempting to go to the next section raised:
ActiveModel::ForbiddenAttributesError in SurveyorController#update
I was wondering if this was a strongparams work and couldn't find strongparams defined in the SurveyorController. I also attempted to set the strongparams, but I have no idea of the attributes defiend in the model. Which way?
I install "surveyor" and "protected_attributes" gems in my repo and ran migrations successfully too. However I have not been able to install and migrate "surveyor_gui". It fails with following error:
/Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/lib/surveyor_gui/models/column_methods.rb:13:in block in <module:ColumnMethods>': uninitialized constant SurveyorGui::Models::ColumnMethods::PermittedParams (NameError) from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/concern.rb:120:in
class_eval'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/concern.rb:120:in append_features' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/app/models/column.rb:2:in
include'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/app/models/column.rb:2:in <class:Column>' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/app/models/column.rb:1:in
<top (required)>'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/lib/surveyor_gui/engine.rb:24:in block (2 levels) in <class:Engine>' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/lib/surveyor_gui/engine.rb:23:in
each'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/bundler/gems/surveyor_gui-a351b314e7a6/lib/surveyor_gui/engine.rb:23:in block in <class:Engine>' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:438:in
instance_exec'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:438:in block in make_lambda' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:184:in
block in simple'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:86:in run_callbacks' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/reloader.rb:83:in
prepare!'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/reloader.rb:55:in prepare!' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/application/finisher.rb:52:in
block in module:Finisher'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in instance_exec' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in
run'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in block in run_initializers' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in
block in tsort_each'
from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in
each_strongly_connected_component_from'
from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in
each'
from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in call' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in
each_strongly_connected_component'
from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in
tsort_each'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in run_initializers' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/railties-4.1.0/lib/rails/application.rb:288:in
initialize!'
from /Users/archanaraut/Documents/work/MyFreedomForms/config/environment.rb:5:in <top (required)>' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:92:in
require'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:92:in preload' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:143:in
serve'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:131:in block in run' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in
loop'
from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in run' from /Users/archanaraut/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/application/boot.rb:19:in
<top (required)>'
from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from /Users/archanaraut/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from -e:1:in `
This is my main concern because most of my questions uses groups.
Would like to discuss how this can be implemented, not sure how to start.
Works the first time, but raises error the second. Losing survey_section_id somewhere in the transition.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.