One possible answer is in Toën-Vezzozi paper From HAG to DAG, who were themselves inspired by Ciocan-Fontanine and Kapranov (Derived Quot schemes and Derived Hilbert schemes).
This approach works well in characteristic zero (otherwise one has to deal with simplicial commutative rings or $E_\infty$-ring spectra, like in Lurie's work).