Printrun doesn't connect when 12 V is on
It sounds a bit like you are having (additional) grounding issues1. Are your MacBook and the RAMPS using the same ground, i.e. are they using the same mains circuit?
If you are using the same power strip, then the next thing to check would be that the PSU on the printer correctly grounded (at the bottom of the unit).
From David Crocker's superlative blog, see Upgrading the large delta printer - Power supply output grounding:

Power supply output grounding
While taking some measurements on my machine, I discovered that the
negative side of the output of the 12V LED power supply I am using was
not connected to ground inside the power supply as I expected. This
presents a safety hazard. So I added an additional wire from ground to
the spare negative output terminal of the power supply.



1 Why do I think this? Three reasons:

Because grounding issues is one of the most common, and over-looked, problems, in circuit design;
I have often had peripheral devices, that use a separate additional power supply, cause a PC laptop to go &quot;haywire&quot; (or worse, die) once connected via RS232/USB (especially charge sensitive devices on the laptop, such as the track pad), due to different, or floating, grounds, and;
I had recently read the blog and made special note to check all of my power supplies as they are all terrible, cheap, Chinese knockoffs, and grounding circuits in Thailand are usually non-existant, or, at best, poorly wired up.