It is shown that parts of planes, helicoids and hyperbolic paraboloids are the only minimal surfaces ruled by geodesics in the three-dimensional Riemannian Heisenberg group. It is also shown that they are the only surfaces in the three-dimensional Heisenberg group whose mean curvature is zero with respect to both the standard Riemannian metric and the standard Lorentzian metric.