Nail biting!

Anyone ever got themselves to stop biting their nails? How did you do it? I really need to stop because I keep making my fingers hurt really bad. It isn't as bad as it was when I was little, my nails are actually long but the sides of my nails and the skin around them I am constantly biting and I really need remedies to stop this! (Please don't say "just don't do it" because it's literally not that easy.)