Trouble shoot:
Check your cabels and make shure there not cut(probably not the case if you can shift for a little while)
The only other reason i can think of is that your deralur is broken. Depending on the type of bike you have, it may not be worth installing a new one( if its one of those cheap walmart bikes) but if its like a trek or specialized or Gary fisher, then take it to a bike shop to get fixed, its not a cake walk for you to do yourself
Those are my ideas, may be somthing diffrent