Let T be an invertible measure-preserving transformation on a σ-finite measure space (X, μ) and let 1 < p < ∞. This paper uses an abstract method developed by José Luis Rubio de Francia which allows us to give a unified approach to the problems of characterizing the positive measurable functions v such that the limit of the ergodic averages or the ergodic Hilbert transform exist for all f ∈ Lp(νdμ). As a corollary, we obtain that both problems are equivalent, extending to this setting some results of R. Jajte, I. Berkson, J. Bourgain and A. Gillespie. We do not assume the boundedness of the operator Tf(x) = f(Tx) on Lp(νdμ). However, the method of Rubio de Francia shows that the problems of convergence are equivalent to the existence of some measurable positive function u such that the ergodic maximal operator and the ergodic Hilbert transform are bounded from LP(νdμ) into LP(udμ). We also study and solve the dual problem.