see an MWE of what fails (apparently you are using some kind of IDE, but you don’t say what).
In any case, I would strongly recommend updating to Julia 1.2 and taking it from there. The version of Optim.jl that supports 0.6 is most likely to be very old.