How to find multiples of 3 and 5, push to an array, and then sum the array in Ruby : I am trying to sum the multiples of 3 and 5 that are less than 1000 using an .each do command, and then a .push to store them all in my array 'multiples'. However, when I try to do this, I get an error message. I am trying to learn how to use these commands and so don't want to use the .select and .inject I've been seeing everywhere. 

I have controllers set up to print @your_output on another page, and have done this successfully with other, simpler problems. However, when I try to do the conditional and store it in div, I get an error. 

    def third_program
        numbers = (1..999).to_a
    
        # Your code goes below.
        multiples = []
        numbers.each do |num|
          div = num % 3 == 0 || num % 5 == 0
            multiples.push(div)
        end
        @your_output = div.sum

        render("programs_templates/third_program.html.erb")
      end

