This is a long answer copied, pasted & edited from a similar previous question from a couple of years ago. I'm a Florida spearo and have 2 different rulers on my guns. While it sounds like a simple question, in practice it's easy to make mistakes that makes the ruler difficult and then you messed up your new expensive gun. There's also 2 times to use the ruler > before the shot and after the shot. EVERY spearo/speara on this board will tell you a story of what will happen if you bring a short fish back on the boat/shore and it's
brutal. I'm just going to focus on the “before the shot”.
You didn't post a picture of your gun so we don't know if it's wood/metal/coated/carbon/etc. Guns get beatup, scratched and bounced around in your car or boat so that critical length mark may become missing.
There's also placement of the ruler. You want to place the ruler on the inside direction of your shooting hand as you hold the gun out straight. This is so that as soon as you spot a close length fish, you can quickly rotate & angle the gun and see the ruler for reference. We all have stories of deeper fish that we thought looked “much bigger” underwater and then topside it was just average size. Never rush a hail-mary long shot, it's a waste of precious bottom time. Take the time to line it up and in that timespan you can glance at the ruler also.
Forwards or backwards. I've seen a bunch of people put the ruler on with the 1 inch mark next to the trigger handle, but you want the 1 inch mark to be at the muzzle. It's better size perspective & easier to judge the fish length by having the ruler's beginning point closer to the fish and farther from your eye for accuracy. As an example hold your finger nail outstretched towards a picture on your wall and then move your finger nail right near your eyeball. It's easier to judge when farther away when the 1 inch mark is near the muzzle.
Materials – There are 3 common materials normally seen on spearguns for length rulers. Solid (metal/plastic/etc) flexible Vinyl Tape, & Paint. Above is a cropped picture of 2 of my guns side by side and they have 2 different rulers. The metal ruler is great because it's extremely durable against scratches, solid aluminum against salt corrosion, & bright easy to see against darkness down deep. The other is a tape ruler and you can see it's harder to read at a quick glance, it does get scratched & nicked loosening the glue underneath. And not shown is Paint, which is just a hash mark for your common fish size limits. But usually wears off in short time with plenty of dives.
My metal ruler is glued on top of a dimpled Rhino coating. A vinyl tape nor paint will work on it. Also if it would be placed on an oil wood finish >> tape & paint won't stick to it, so metal/solid ruler is best. In the metal ruler above, that ruler was actually twice as wide when purchased. I cut the ruler in half lengthwise, so be creative when chosing if you go with a solid ruler. This ruler was purchased at Home Depot and fabric stores have plastic long rulers.
The taped ruler gun in my picture is on a teak non-oiled material. But it would still come loose due to wood's porosity & expansion. This gun was sealed and coated prior to the ruler attachment, then overcoated again ontop of the ruler to lock it in place. I beatup / abuse my dive gear and my wood Koah speargun gets refinished & recoated every 5 years (600+ dives), including a new ruler attached. This vinyl ruler actually came from rod & reel fisherman. It's made to be taped to a fishing rod so shore fisherman could instantly check their catch without having to search for another ruler up on the banks/car. There's hundreds available, just google search “fishing rod ruler” to pick your best option/length/color/width/etc. But make sure once you place it on your gun, you 'over coat it “ with a clear sealer brushed on & located in the paint aisle of your hardware store(or nail polish at minimum).
Painted hash marks. Probably the cheapest option, but no one trusts them. Everyone always remeasures a fish when they get back above water with hash marks. But by that time it's too late and your friends are yelling at your short fish.
Lastly, post up a picture of your gun. Lots of spearo's here are very helpful and may have examples for better solutions that have worked great for them.