First order of business: install an old work ceiling fan box!
(The linked box is the first one that turned up on Google -- there are several makes and models of old work ceiling fan boxes available, all of the basic design depicted.)
Right now, not only are you violating NEC section 300.15,
Boxes, Conduit Bodies, or Fittings - Where Required. A box shall be
installed at each outlet and switch point for concealed knob-and-tube wiring.
Fittings and connectors shall be used only with the specific wiring methods
for which they are designed and listed.
Where the wiring method is conduit, tubing, Type AC cable, Type MC cable, Type
MI cable, nonmetallic-sheathed cable, or other cables, a box or conduit body
shall be installed at each conductor splice point, outlet point, switch point,
junction point, termination point, or pull point, unless otherwise permitted
in 300.15(A) through (L).
including the exceptions in (B),
Equipment. An integral junction box or wiring compartment as part of
approved equipment shall be permitted in lieu of a box.
(E),
Integral Enclosure. A wiring device with integral enclosure identified for
the use, having brackets that securely fasten the device to walls or ceilings
of conventional on-site frame construction, for use with nonmetallic-sheathed
cable, shall be permitted in lieu of a box or conduit body.
and (H),
Insulated Devices. As permitted in 334.40(B), a box or conduit body shall
not be required for insulated devices supplied by nonmetallic-sheathed cable.
you have created a very nice falling ceiling fan trap! Ceiling fans are heavy and require solid anchorage to two ceiling joists, or at least the solid-enough anchorage provided by a properly installed ceiling fan box. Furthermore, without a box, an overheating or arcing splice can proceed to directly light your ceiling on fire!
Once you rectify the lack of a suitable box to mount the fan to, you can then wire black&blue to black, white to white, and leave the bare (or green) wire from the fan unhooked (or terminated to the green screw in the box if you're uncomfortable leaving a wire end floating -- it makes no difference electrically in your case, but may be preferable for mechanical reasons).
Best Answer
There are almost certainly more colored (non-white) wires in the back of the box which are for other hots.
Is the blue wire blue or green? It matters a lot.
A green wire should be attached to the ground wire bundle that may be in the back of the box. Absent that, look and see if the wires enter the box via cable or pipe. If cable and no ground wires, connecting a ground is pointless. If pipe, most likely this conduit is the ground, and the green wire can be attached to the steel box. There may be a tapped hole for a 10-32 screw somewhere in the back of the box. If not and you are crafty you can drill and tap one (any machine screw 6 or larger will do as long as the thread is at least -32).
If the wire is honest-to-gosh blue, then is it light blue? That might be a Euro neutral, but that would be strange. Otherwise it is assuredly one of the hots, you have a separate hot for fan and light, allowing you to control the two of them individually. If you want, you can do some extra wiring to exploit it... Or you can simply connect the blue and black together to the power supply, and fan and light will operate together. Some fans permit local control of light and fan i.e. With 2 pull cords. Those are always fun!