How to map UV on generated Mesh from Curve?
You need the UV map to be flat and straight, as if the rebar was still straight.
The rings will then just follow the bent shape.   



UV Map
The UV Map is the most important thing here. It needs to be flat and straight.
Don't forget to cut off the end caps with seams, like I did.  

I used the default Angle Based unwrap, which may/may not work in your case.
There's also an addon called UV Squares which comes with Blender and will do the work for you.  

 

Mapping Node
The Mapping node will allow you to precisely scale the texture.
Notice that in my case, the Y Scale is considerably smaller.
Also, don't forget to plug in the UV Map output.



Note
I used a generated wave texture for the rings. With a proper image texture you'll surely get better results.  

Good luck.