Coffee is an organic solution, but if you don't mind an inorganic solution:
Copper metal in the soil, and sprinkling Epsom salts works for me.
I use old copper pennies near plants which are attacked by small slugs here.
I buried copper pennies when I planted hostas, but the hostas are not up yet here.