universityofadelaide / splat

Self & Peer Learning Assessment Tool
GNU General Public License v3.0
1 stars 1 forks source link

How to start the server ? #1

Closed whol019 closed 5 years ago

whol019 commented 6 years ago

Sorry for my stupid question. Am from University of Auckland. Tried to install your application, got to the step of

but I dont know how to start the sever/app. (am not ruby developer) Tried to run rake at the project level, but got some error message as below. Any pointer will be really appreciated. Thanks Wen

###################################################################################

bundle exec rake /usr/bin/ruby -I/usr/local/share/gems/gems/rspec-core-3.6.0/lib:/usr/local/share/gems/gems/rspec-support-3.6.0/lib /usr/local/share/gems/gems/rspec-core-3.6.0/exe/rspec --pattern spec/**{,/*/**}/*_spec.rb .............................................................................................................................FF

Pending: (Failures listed here are expected and do not affect your suite's status)

1) AssignmentsController POST #instruction when instructions are successfully saved adds new questions

No reason given

 # ./spec/controllers/assignments_controller_spec.rb:270

2) CanvasService when creating a custom gradebook column requires the correct parameters

No reason given

 # ./spec/services/canvas_service_spec.rb:54

Failures:

1) responses/new.html.erb displays the assignment questions Failure/Error: @questions.select(:question_category_id).distinct.map do |assignment_question| question_with_students = [] questions = @questions.where({ question_category_id: assignment_question.question_category_id })

         questions.each do |question|
           question_with_student = { question: question, students: students }
           question_with_students << question_with_student
         end
         response_question = { category_name: assignment_question.question_category.name, student_questions: question_with_students }
         response_questions << response_question

 ActionView::Template::Error:
   Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'myapp_test.questions.assignment_id' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT `questions`.`question_category_id` FROM `questions` WHERE `questions`.`assignment_id` = 104 AND (questions.enabled = 1 or questions.predefined = 0) ORDER BY questions.assignment_id ASC, questions.position ASC
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
 # /usr/share/ruby/monitor.rb:214:in `mon_synchronize'
 # ./app/helpers/responses_helper.rb:31:in `map'
 # ./app/helpers/responses_helper.rb:31:in `response_question_list'
 # ./app/views/responses/_new_vue.html.erb:30:in `_app_views_responses__new_vue_html_erb___4403960617995987194_47356742107200'
 # ./app/views/responses/new.html.erb:98:in `_app_views_responses_new_html_erb___40936700180535809_47356741422420'
 # ./spec/views/responses_view_spec.rb:34:in `block (2 levels) in <top (required)>'
 # ------------------
 # --- Caused by: ---
 # Mysql2::Error:
 #   Expression #1 of ORDER BY clause is not in SELECT list, references column 'myapp_test.questions.assignment_id' which is not in SELECT list; this is incompatible with DISTINCT
 #   /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'

2) responses/new.html.erb displays all group member names Failure/Error: @questions.select(:question_category_id).distinct.map do |assignment_question| question_with_students = [] questions = @questions.where({ question_category_id: assignment_question.question_category_id })

         questions.each do |question|
           question_with_student = { question: question, students: students }
           question_with_students << question_with_student
         end
         response_question = { category_name: assignment_question.question_category.name, student_questions: question_with_students }
         response_questions << response_question

 ActionView::Template::Error:
   Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'myapp_test.questions.assignment_id' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT `questions`.`question_category_id` FROM `questions` WHERE `questions`.`assignment_id` = 105 AND (questions.enabled = 1 or questions.predefined = 0) ORDER BY questions.assignment_id ASC, questions.position ASC
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
 # /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
 # /usr/share/ruby/monitor.rb:214:in `mon_synchronize'
 # ./app/helpers/responses_helper.rb:31:in `map'
 # ./app/helpers/responses_helper.rb:31:in `response_question_list'
 # ./app/views/responses/_new_vue.html.erb:30:in `_app_views_responses__new_vue_html_erb___4403960617995987194_47356742107200'
 # ./app/views/responses/new.html.erb:98:in `_app_views_responses_new_html_erb___40936700180535809_47356741422420'
 # ./spec/views/responses_view_spec.rb:42:in `block (2 levels) in <top (required)>'
 # ------------------
 # --- Caused by: ---
 # Mysql2::Error:
 #   Expression #1 of ORDER BY clause is not in SELECT list, references column 'myapp_test.questions.assignment_id' which is not in SELECT list; this is incompatible with DISTINCT
 #   /usr/local/share/gems/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'

Finished in 11.88 seconds (files took 1.87 seconds to load) 129 examples, 2 failures, 2 pending

Failed examples:

rspec ./spec/views/responses_view_spec.rb:32 # responses/new.html.erb displays the assignment questions rspec ./spec/views/responses_view_spec.rb:40 # responses/new.html.erb displays all group member names

Coverage report generated for RSpec to /var/www/tmp/splat-master/coverage. 781 / 1192 LOC (65.52%) covered. /usr/bin/ruby -I/usr/local/share/gems/gems/rspec-core-3.6.0/lib:/usr/local/share/gems/gems/rspec-support-3.6.0/lib /usr/local/share/gems/gems/rspec-core-3.6.0/exe/rspec --pattern spec/**{,/*/**}/*_spec.rb failed

aroos commented 6 years ago

Hi Wen,

the easiest way to start a server to have a look is:

Cheers, Alex

whol019 commented 6 years ago

Thanks Alex Didn’t work for me. Will try to install it on a different server next week. Cheers Wen From: aroos notifications@github.com Sent: Friday, 7 September 2018 3:36 PM To: universityofadelaide/splat splat@noreply.github.com Cc: whol019 wenchen.hol@gmail.com; Author author@noreply.github.com Subject: Re: [universityofadelaide/splat] How to start the server ? (#1)

Hi Wen,

the easiest way to start a server to have a look is:

Cheers, Alex

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/universityofadelaide/splat/issues/1#issuecomment-419312230, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASzlQMpq7kkS-PbKOKPZEOOUmBmDAAADks5uYem2gaJpZM4WeG-Q.

spd-25 commented 6 years ago

Hi Wen, In the procfile type: web: bundle exec puma -C config/puma.rb and then start the server using rails server. Probably this would work.

whol019 commented 6 years ago

Thanks everyone for your kind assistance. I can install it now. Somehow the output still not right for my instance and in developer console I did not see any file missing or error message. And I cannot save assignment in SPLAT. Maybe because I run it in development mode. ☺ No worry Cheers Wen

[cid:image001.png@01D448F4.B5A708F0] From: spd-25 notifications@github.com Sent: Monday, 10 September 2018 6:45 AM To: universityofadelaide/splat splat@noreply.github.com Cc: whol019 wenchen.hol@gmail.com; Author author@noreply.github.com Subject: Re: [universityofadelaide/splat] How to start the server ? (#1)

Hi Wen, In the procfile type: web: bundle exec puma -C config/puma.rb and then start the server using rails server. Probably this would work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/universityofadelaide/splat/issues/1#issuecomment-419736055, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASzlQHtzSiMHEG8arXyp6blN7gI8An-jks5uZWGTgaJpZM4WeG-Q.

aroos commented 6 years ago

Hi Wen,

I just pushed an update to the project. It removes the wrong comment tags in erb files and adds vagrant. Vagrant should make it easier to start. Steps to use vagrant are in README.md.

Cheers, Alex