Production of B[+ over c] mesons in proton-proton collisions at a center-of-mass energy of 8 TeV is studied with data corresponding to an integrated luminosity of 2.0 fb[superscript -1] recorded by the LHCb experiment. The ratio of production cross sections times branching fractions between the B[+ over c] → J/ψπ[superscript +] and B[superscript +] → J/ψK[superscript +] decays is measured as a function of transverse momentum and rapidity in the regions 0 < p[subscript T] < 20 GeV/c and 2.0 < y < 4.5. The ratio in this kinematic range is measured to be (0.683 ± 0.018 ± 0.009)%, where the first uncertainty is statistical and the second systematic.