Silver nanoparticles were synthesized by irradiating silver nitrate solution (10-4 M) (methanol:water as a solvent) with different concentrations of aniline as a stabilizer in a 60Co g-ray source at a dose rate of 1.1 kGy. The particles exhibiting maximum stability up to a period of 7 days were obtained at the concentration of 0.1M aniline. The average particle size of the nanoparticles as estimated from XRD and TEM was found to be ~23 nm. Silver-Polyaniline (Ag-Pani) nanocomposite was prepared by oxidative polymerization of aniline. The applicability of synthesized nanocomposite as a sensor was tested by exposing the same to different chemical vapors viz. alcohols, amines, ammonia, chloroform etc. The results revealed its selectivity towards ammonia vapors and a long term stability of response is observed up to a period of two months. The above results are well supported by FT-IR spectroscopy.