jeudi 9 novembre 2017

Connection reset by peer - SSL_connect -> Only when logged in (devise, cancan)

I am a total newbie regarding devise and cancan and I am very lost and need at least a tip where to start. I have undertaken a ruby on rails app. I changed the data model btw. Earlier there was Project>Participant and now there is Project>Participant>Person

The error below only appears when I am logged in. If I am logged in as an admin the error appears a little less often. If I am logged in as a normal user the error appears very often.

The strange part is, when I hit F5 a couple of times after the error appeared it all works. But while hitting F5 the Extracted source changes once. The errors are below. I have absolutely no idea how to interpret this errors and why they appear. Please help me.

Error 1

Connection reset by peer - SSL_connect

Extracted source (around line #57): views/participants/_participant.html.erb

54:       <td><%=  orga.first.description %></td>
55:      <% end %>
56:   <td><%= link_to image_tag("magnifier.png", { :title => t(:show) }),     participant_person_path(participant_id: participant.id, id:     participant.person_id) %></td>
57:   <td><% if can? :destroy, participant%><%= link_to image_tag("bin.png", { :title => t(:destroy) }), [participant.project, participant], method: :delete, data: { confirm: t(:are_you_sure) } %><%end%></td>
58:     </tr>
59:   <% end %>
60: <% end %>

Application Trace | Framework Trace | Full Trace

app/models/user.rb:26:in `groups?'
app/models/ability.rb:367:in `block (2 levels) in initialize'
app/models/ability.rb:366:in `block in initialize'
app/views/participants/_participant.html.erb:57:in    `_app_views_participants__participant_html_erb___191894396_77603860'
app/views/projects/_show_private.html.erb:1153:in     `_app_views_projects__show_private_html_erb___593120840_78692430'
app/views/projects/show.html.erb:31:in     `_app_views_projects_show_html_erb___45130175_76780260'
app/controllers/projects_controller.rb:99:in `show'

Error 2

Connection reset by peer - SSL_connect

Extracted source (around line #10):

7:       <% authorization = true %>
8:     <% end %>
9:   <% end %>
10:   <% if @project.created_by == current_user.cn || current_user.admin? %>
11:     <% authorization = true %>
12:   <% end %>

Thank you in advance =)

Aucun commentaire:

Enregistrer un commentaire