According to the Maxwell equations in an arbitrary reference frame in general relativity the electric charge distribution may be completely compensated by a magnetic field in the presence of the frame's rotation. Exact self-consistent examples of systems containing a charged fluid, purely magnetic field and gravitation, are constructed forming a generalization of the Godel solution. The absence of an electric field in these systems in the co-moving (with matter) reference frame is in agreement with the above property of the Maxwell equations resulting in no repulsion between similar charges. In the limiting case when the charge density of the fluid vanishes, the Godel solution is recovered. Geometric, hydrodynamic and electromagnetic properties of the new solutions are studied.