I posted something that may help you out (here)[Work Around for Midi Out problem].
TL; DR;
Paste this code into the buffer that you are evaluating;
@osc_server ||= SonicPi::OSC::UDPServer.new(4559, use_decoder_cache: true) #__nosave__
Hope this helps