Regardless of if you have an acoustic or electric bass, I'd go with a mike. You can get a reasonably price condenser mike, such as this;
MXL 990. And something like the
M-Audio MobilePre to interface it to your computer (vi usb in this case, there are other routes but this is probably easiest for a first-time recorder.)
As corkyg mentioned, you have to have a quiet room to record in - not soundproof, but you don't want to have a window open and record cars passing by or anything like that. And, if you do have an electric bass, it's best to mike the amp, and then step outside the room (with a long enough chord) and close the door to play. Otherwise, the mike will pick up the sound of you physically playing. If you have an acoustic, you'll just need to mike the instrument and start playing.
In my opinion, as someone who has recorded a lot before, miking your guitar or amp will give you the best, most natural sound. Especially if you have an acoustic instrument.
However....if that all sounds like too much work, just grab some pickups and/or amp with some direct-audio-out hook ups
😉