Where does require look for modules?

You should be using *.ex files not *.exs files. The latter are only compiled in memory and beam files are not written to disk, which is why MyMath cannot be found. For a minimal fix, just rename my_math.exs to my_math.ex