I'm basically looking for a gem that allows a user to upload a bitmap and to convert that bitmap to an HTML SVG element. The output of the operation would be code that renders an SVG in the browser. I've checked rubygems.org and have seen nothing that fits the bill.

You'd need to use some kind of background-worker gem to do this server side, and it certainly wouldn't be "app-like" fast. IIRC there is a site someone showing comparisons between different image-vector converters but I couldn't find it. I did find a few sites that claim to do this online, so you might be able to just open a bunch of those and see if they reveal anything about what they are doing

It all depends on what the bitmap is. For simple text and lines this might work OK...

It's possible, (see http://vectormagic.com/) but I think you'll have to send the image through imagemagick and autotrace instead of trying to do it all in Ruby. Resize to a sane starting resolution, reduce noise, quantize colors, then trace. This is a very slow process even in Illustrator, and there are so many variables that each image will likely require a dozen different trace attempts. Ruby is just too slow for this kind of work.

Obviously you'll want to use something like Sidekiq and a few dedicated worker machines.

Also, I think it would be best to rasterize the result to PNG instead of previewing the SVG. Traced vectors can be extremely complex, and you'll crash people's browsers. Let them download the vector image separately.