In this sort of situation where one cannot see the cause of the
problem by inspection I use ruby-debug to break into the controller
and the view to check the value of variables. This usually gives
useful clues.
Well since Event.all should have returned an array and not thrown an
error, my guess is there is a problem with your model/database. Go
into the terminal and open up a session using script/console, at the
prompt enter Event.all and see what it returns…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.