The Ras GTPase activating proteins (RasGAPs) are regulators of the conserved Ras/MAPK pathway. Various roles of some of the RasGAPs in learning and memory have been reported in different model systems, yet, there is no comprehensive study to characterize all gap genes in any organism. Here, using reverse genetics and neurobehavioural tests, we studied the role of all known genes of the rasgap family in C. elegans in associative learning and memory. We demonstrated that their proteins are implicated in different parts of the learning and memory processes. We show that gap-1 contribute redundantly with gap-3 to the chemosensation of volatile compounds, gap-1 plays a major role in associative learning, while gap-2 and gap-3 are predominantly required for short- and long-term associative memory. Our results also suggest that the C. elegans Ras orthologue let-60 is involved in multiple processes during learning and memory. Thus, we show that the different classes of RasGAP proteins are all involved in cognitive function and their complex interplay ensures the proper formation and storage of novel information in C. elegans.