All in costs including a shitty welder? I'd peg it at $2,000.
I built the following two rails and the material costs were about $1,500 each:
I did get the stuff for free though :)
Also, don't count on being able to actually make a rail if you have never welded before and have no guidance. It's a lot more difficult than it looks.