ERROR: While executing gem ... (Gem::GemNotFoundException) C

hi every one i am facing this problem .please tell how to solve it.if i
am instaling rails its showing rails installed.bu if i tried rails
test.Its giving rails command not found