How long do you chase and flirt with a girl before you ask her out?
Sometimes it's best to get to know a girl for a while.
There is no set rule. Sometimes it's best to get to know a girl for a while (anywhere from a few weeks to a few months) before you ask her out. Other times it's best to ask her straight away, especially if you don't know when you'll see her again.
There are two things to avoid though. First, be yourself. Don't pretend to be all sweet and romantic if you're not going to keep this up when you're going out with her. It won't work, as she'll quickly realise you're not the guy you pretended to be. Second, be honest. Don't pretend to be only interested in a friendship if you actually want more.