The context clues here point to a late 19th century music hall origin, but the jargon suggests at least some familiarity with nautical life. Kenneth Goldstein's liner notes for Paul Clayton's Foc'sle Songs and Shanties album (1959) read:
This delightful British foc'sle ditty has been collected only rarely from tradition. More than likely it was first popularized in British music halls, and taken from there to the foc'sle by one of the many sailors who frequented the music halls on their layover between ocean trips. Mrs. Clifford Beckett, who supplied the only text I have found in print, suggests that the 'good ship Ragamuffin' refers to the old Bellerophon.
Beckett published a short book of eight Shanties and Forebitters in 1914. The HMS Bellerophon, colloquially called the Billy Ruffian, was a Royal Navy ship from 1786.
'Twas the fifteenth of September,
How well I do remember,
It nearly broke my poor old mother's heart,
For I shipped with Captain Nipper
In a big four-masted clipper
Bound away down south for foreign parts.
And the wind began to blow,
And the ship began to roll,
And the devil of a hurricane did blow—oh, my, oh!
It nearly knocked the stuffin'
From the good ship Ragamuffin,
And we thought to the bottom we should go.
Then we hoisted up our anchor,
And we set our jib and spanker,
And the pilot took us to the harbor's mouth.
Then from the tug we parted,
And on our voyage started,
With a compass headed East-Nor-West by south.
Then there came a good stiff breeze
That made the old man sneeze,
And carried away the sails on every hand,
And for seven long days we bore it,
While running right afore it,
Thinking we would never see the land.
But the ship got caught aback,
And the stays began to crack,
And the fore top gallant fores'ls carried away,
So we pulled the helm over,
And headed straight for Dover,
And at last we anchored safe within the bay.
We were outbound to Calcutta
with a stock of Irish butter
And cigarettes and whisky in galore
Passengers we were twenty
and heaven knows that was plenty
For the good ship could carry no blinking more.
Then the captain came on deck
and he said, "Blooming heck!"
And bade each man put on an oilskin coat
He said he’d come to a decision
as we’d plenty of provisions
We was going to run a second voyage out.