If your Vim has +ruby support, you can syntax highlight the current file and serve it over rack relatively simply.
Create a file with the following contents, then run :ruby load "filename.rb" inside Vim.
You can then visit localhost:1234 in your browser.
app = Rack::Source.new(__FILE__, lexer: :ruby)
child = fork do
Logger: WEBrick::Log::new("/dev/null", 7),