Studies of gene-environment interplay typically focus on one environmental factor at a time, resulting in a constrained view of social context. The concept of environmental contingency is introduced as a corrective. Drawing on the National Longitudinal Study of Adolescent Health and qualitative comparative analysis, the authors focus on an example involving social capital, a gene associated with a dopamine receptor (DRD2), and educational continuation beyond secondary school. For boys, (1) DRD2 risk is associated with a decreased likelihood of school continuation; (2) one configuration of social capital -- high parental socioeconomic status, high parental involvement in school, and a high-quality school -- compensates for this negative relationship, consistent with environmental contingency; but (3) boys with DRD2 risk are less commonly observed in settings that are rich in social capital.