I usually just play along to songs I can hum the bass line to, as someone said above. I've been playing for about 9 years, never really took time to focus on learning by ear, but over the last year or so I have and I can almost play the bass line right away to a song (as long as it isn't too technical

). It really does pay to just practice songs without any crutch such as tabs. Lately I have found myself almost boycotting tabs for this reason. Just practice, it really is the only way.