Let X be a nonsingular projective algebraic variety over C, and let M g,n,β (X) be the moduli space of stable maps f : (C, x 1 , . . . , x n ) → X from genus g, n-pointed curves C to X of degree β. Let S be a line bundle on X. Let A = (a 1 , . . . , a n ) be a vector of integers which satisfyConsider the following condition: the line bundle f * S has a meromorphic section with zeroes and poles exactly at the marked points x i with orders prescribed by the integers a i . In other words, we require f * S (− n i=1 a i x i ) to be the trivial line bundle on C. A compactification of the space of maps based upon the above condition is given by the moduli space of stable maps to rubber over X and is denoted by M ∼ g,A,β (X, S). The moduli space carries a virtual fundamental classin Gromov-Witten theory. The main result of the paper is an explicit formula (in tautological classes) for the push-forward via the forgetful morphism of [M ∼ g,A,β (X, S)] vir to M g,n,β (X). In case X is a point, the result here specializes to Pixton's formula for the double ramification cycle proven in [28]. Several applications of the new formula are given.