HMS Ruby was a 40-gun frigate of the Commonwealth of England, built by Peter Pett at Deptford and launched on 15 March 1652.
She took part in numerous actions during all three of the Anglo-Dutch Wars of 1652-54, 1665–67 and 1672-74. She later served in the West Indies, and in 1683 was sent to the Leeward Islands to protect their British settlements against Carib and pirate raids. In 1687 the notorious English pirate Joseph Bannister was captured by the crew of Ruby and brought to Port Royal for trial. He later escaped and returned to piracy, but was recaptured by HMS Drake. Fearing another escape the governor of Jamaica had him hanged without trial before he could get off the ship
Ruby was rebuilt in 1687 at Sir Henry Johnson's shipyard at Blackwall. She served in the War of the Spanish Succession and, commanded by Captain George Walton, took part in the Action of August 1702 as part of a fleet under Admiral John Benbow. She was one of the only ships to support the Admiral in HMS Breda in that engagement.
HMS Ruby was rebuilt at Deptford in 1706 as a fourth rate ship of the line carrying between 46 and 54 guns, but was captured by the Mars the following year during the Battle at The Lizard, 21-10-1707 (NS).
Brought back to Brest, she was commissioned into the French Navy. She took part in a campaign to the Levant, and was decommissioned the next year to be broken up.