Much was reported about Ruby's background. I for one thought Ruby's reason was B.S.
I am livid to this day that the liberals of that era used the assassination to attack conservative criticism of JFK and liberal feeeeeeeeeeelings claiming that the criticism caused Oswald to kill the President. JFK/LBJ liberals began a campaign of FCC "Fairness Doctrine" complaints that pretty much shut down conservative talk on radio for more than twenty years (until the mid-80s).
Based on the issues of timing (had Oswald not held things up to get a sweater, Ruby would have missed meeting him by five minutes), and the fact that Ruby, a dog lover's dog lover, had left his dog in his car...I think that Ruby's act was impulsive, not premeditated. He didn't have a formed intention of killing Oswald when he entered the jail. It took an incompetent showboating defense attorney (Melvin Belli) to turn a simple manslaughter case against his client, Ruby, into a murder one conviction.