Current source load mosfet
The circuit shown above even works with an ideal current source. The reason is that the NMOS transistor has an output resistance, which is often called rds. A small voltage at the input of the NMOS will cause a current id which is given by id=Vi * gm. The output resistance will convert this current back into a voltage Vo = -id * rds = -Vi * gm * rds. 

It is now easy to see that the gain of the circuit is Vo/Vi = -gm*rds.