We present deep spectra of ring nebulae associated with Wolf-Rayet (WR) and O-type stars: NGC 6888, G2.4+1.4, RCW 58, S 308, NGC 7635 and RCW 52. The data have been taken with the 10m Gran Telescopio Canarias and the 6.5m Clay Telescope. We extract spectra of several apertures in some of the objects. We derive C 2+ and O 2+ abundances from faint recombination lines in NGC 6888 and NGC 7635, permitting to derive their C/H and C/O ratios and estimate the abundance discrepancy factor (ADF) of O 2+ . The ADFs are larger than the typical ones of normal H ii regions but similar to those found in the ionised gas of star-forming dwarf galaxies. We find that chemical abundances are rather homogeneous in the nebulae where we have spectra of several apertures: NGC 6888, NGC 7635 and G2.4+1.4. We obtain very high values of electron temperature in a peripheral zone of NGC 6888, finding that shock excitation can reproduce its spectral properties. We find that all the objects associated with WR stars show N enrichment. Some of them also show He enrichment and O deficiency as well as a lower Ne/O than expected, this may indicate the strong action of the ON and NeNa cycles. We have compared the chemical composition of NGC 6888, G2.4+1.4, RCW 58 and S 308 with the nucleosynthesis predicted by stellar evolution models of massive stars. We find that non-rotational models of stars of initial masses between 25 and 40 M ⊙ seem to reproduce the observed abundance ratios of most of the nebulae.