I never had the experience that I moved to a country and started to study a language from scratch. When I moved to Japan to study Japanese at university, I was at intermediate level and by the end of the year, I was advanced and felt like my English and my Japanese were at the same level. But after moving to China, I stopped practising Japanese, so my level dropped substantially. When I moved to China, I could read and write a bit but not talk at all. I spoke mainly German and English because I was teaching German and had a lot of foreign friends but I took private classes once per week and it took me half a year until I felt comfortable talking in Chinese. The first time I only stayed for a year but I returned to China after two years, married a Chinese and lived with his family for five years in China. Yes, I can speak Chinese comfortably but I'm far from what I would call fluent. I never lived in an English speaking country and only learnt it at school but I'm reasonably fluent. So, in my case, just living in an immersive environment won't make me fluent.
Well, I wasn't a beginner in Chinese by the time I moved to China but had studied Chinese as a minor at university. So, I had a year of classroom training and years of reading texts in Chinese under my belt before I actually moved to China. Seems the only thing that works for me is learning a language at school. Majoring or minoring in a language at university, moving to the country, having a native speaker as spouse all don't seem to do the trick. I'm a hopeless case.
@Miriam: "in my case, just living in an immersive environment won't make me fluent."
Immersion isn't always the best solution. In an interesting study, the US government concluded that their program of sending beginning Hindi students to India for immersion was a failure. The students got frustrated and ended up relying on English to get by. But, giving them an academic year of classroom training and then sending them to India produced great results.