You must do your gauge in the stitch that they recommend. the pattern says 22 sts = 4”; 24 rows = 4” in St st, which is stockinette stitch. If you've been trying to gauge swatch doing ribbing, the ribbing pulls in and you'll always come out smaller.
You have to gauge swatch in stockinette, and you only have to knit 5 inches wide, not 8" (because you want to measure 4" within the 5", you never want to measure edge to edge)
So when you measure your 4 inches you should get 22 sts, and 24 rows.
To get a 5" swatch, you need to caluclate how many stitches to cast on. So 22 sts/4 sts per in = 5.5 sts per inch, you want something that measures 5" so multiply 5" x 5.5 sts per inch= 27.5 sts.
So round up and cast on 28 sts to get a 5 in. swatch. You'll save your self more time by not knitting 8".