What is the origin of the phrase 'right out of the box'?

This is a real brain tester. I do Know the origins of several other phrases, such as "The Whole Nine Yards" referring to the 9 yds of fabric used for the Scottish great kilt.

***CORRECTION*** TO "THE WHOLE NINE YARDS" No suits, kilts or wedding veils here. (The Scottish did not use yards as a measurement!) This answer came straight from several WWII vets.

In WWII, gunners in aircraft (tail gunners, belly gunners, etc) had limited space and weight available for ammunition. The length of a machine-gun bullet chain for these aircraft, when stretched out, measured 27 feet in length. So when the gunner "let him have it" he gave the enemy the "whole 9 yards."

But I believe I just may have a starting point. In the latter part of the 1800's, est around 1860, Winchester was advertising its ammunition as The Most Accurate "Right Out of The Box".