CSC/ECE 517 Fall 2017/E1773 Investigate and Fix Expertiza Production Version Runtime Exceptions.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 17: Line 17:


/config/routes.rb
/config/routes.rb
===1. NoMethodError: undefined method 'call' for nil:NilClass ===
  From the Airbrake issue page we could find out that the problem is actually caused by a gem called passenger.
  Although we couldn't find any sign of passenger gem in the recent master branch, But there is a clear sign we found during our review of other errors that some developers had used passenger.
  The gem might be under the production path `/home/rails/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.16/' So the solution might be just to remove the gem passenger from production environment.

Revision as of 01:08, 26 October 2017

Introduction

Background

Expertizais a open-source ruby-on-rails project on github. It constructs a peer-review system by enabling interactions among users and instructors. Students can sign up for a class, view assignments, submit assignments and give peer reviews using expertiza. Instructors can publish assignments, surveys, and reviews, view statistical results and make announcements. The website is created and currently maintained mainly by the students and faculties from NCSU.

Motivation

Airbrake is a online debugging tool for rails projects that is currently incorporated in Expertiza. Thus, Expertiza production errors at run time are tracked and reported statistically to Airbrake for reviewing and debugging. Our goal for this OSS project is to fix the top 10 run time exceptions ranked by occurrences reported to Airbrake. You can check the 10 most ranked exceptions by click on the previous hyperlink.

Airbrake Run-time Exceptions and Fixes

By investigating into the top 10 errors from airbrake, we can divide them into different categories by the root of their causes.
1. NoMethodError: undefined method for nil:NilClass (4 out of 10)
2. AbstractController::ActionNotFound (4 out of 10)
3. ActionController::InvalidAuthenticityToken (1 out of 10)
4. ActiveRecord::RecordNotFound: Couldn't find Participant without an ID (1 out of 10)

Files Modified

/config/routes.rb

1. NoMethodError: undefined method 'call' for nil:NilClass

 From the Airbrake issue page we could find out that the problem is actually caused by a gem called passenger.
 Although we couldn't find any sign of passenger gem in the recent master branch, But there is a clear sign we found during our review of other errors that some developers had used passenger.
 The gem might be under the production path `/home/rails/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.16/' So the solution might be just to remove the gem passenger from production environment.