So you have narrowed it down now. It should have nothing to do with the ramps boards.
Are you using my marlin, with no edits? You should at least for now. Wire 1 end stop Normally Open and try it out. Figure out which axis is causing the problems. It could also be repetier or whatever control software you are using. Make sure you are plugging them into the right 2 pins as well. you have min and max and only use 2 of the 3 pins.