Dr. Ray was born in Beverly, Maine, and attended Phillips Andover Academy and Bowdoin College. He apprenticed with Dr. Shattuck in Boston and completed his medical studies at Harvard in 1827. He spent a year in England and France in medical study, following which he practiced in Portland and Eastport, Maine.
In 1841, Dr. Ray became the Medical Superintendent of the State Hospital for the Insane in Augusta, Maine. In 1845, he became the superintendent of Butler Hospital in Rhode Island, remaining there for 20 years. He then moved to Philadelphia, where he remained active in writing and in the professional community.
Dr. Ray was a prolific writer and an expert in the medical-legal field. He served as a guest lecturer at Brown University, the University of Pennsylvania, and founded the Social Service Association. He was the first to define and use the term “mental hygiene” in a book (1863). His book, Medical Jurisprudence of Insanity (1838) went through six editions.Dr. Ray served as President of the Association of Medical Superintendents of American Institutions for the Insane (1855-59).