Baking soda is an old remedy for ants. They will not cross it. Spiders, I don't know.
For more information:
You should also read Richard Heller's Ask A Pro Q&A, "I have bull ants, fire ants, and tiny black ants. Is there a green and effective way to get rid of these pests?"