Fear Ye Not the Red Screen of Better Errors
-
Missing template N
-- note controller#action render view's name, and checkviews
for misspelled folder/file names, or missing view -
No route matches
-- compareroutes.rb
name to controller route name -- check form route exists inroutes.rb
-- check form route name -
param is missing or the value is empty: PARAM_NAME
-- match the view form element'sname
to the controllerfetch.params
name -
undefined local variable or method NAME
-- could be a local view var or method that is missing, but usually missed the@
for an instance variable that is defined in the controller#action -
uninitialized constant SOMEController
-- mispelled/non-matching controller name inroutes.rb
and the actual filenamecontrollers\NAME_controller.rb
-
class/module name must be CONSTANT for controller
-- probably not CamelCase controller name in controller file - always check logic, from math calcs to conditionals
- if a view does not display a value, probably missing the
=
in<%= %>
- be sure form text, elements, attributes match perfectly to spec, read more each test failure message and/or the actual test file
-
label
&&/ROUTE displays NAME entered when the form is submitted
errors: match html labelsfor
with the corresponding elementid
, *these errors cascade to numerous other errors, disappointing at first but a giant relief when corrected
Top comments (0)