Long gamma-ray bursts (GRBs) are associated with the gravitational collapse
of very massive stars. The central engine of a GRB can collimate relativistic
jets that propagate inside the stellar envelope. The shock waves produced when
the jet disrupts the stellar surface are capable of accelerating particles up
to very high energies. If the jet has hadronic content, neutrinos will be
produced via charged pion decays. The main goal of this work is to estimate the
neutrino emission produced in the region close to the surface of the star,
taking pion and muon cooling into account, along with subtle effects arising
from neutrino production in a highly magnetized medium. We estimate the maximum
energies of the different kinds of particles and solve the coupled transport
equations for each species. Once the particle distributions are known, we
calculate the intensity of neutrinos. We study the different effects on the
neutrinos that can change the relative weight of different flavors. In
particular, we consider the effects of neutrino oscillations, and of neutrino
spin precession caused by strong magnetic fields. The expected neutrino signals
from the shocks in the uncorking regions of Population III events is very weak,
but the neutrino signal produced by Wolf-Rayet GRBs with $z<0.5$ is not far
from the level of the atmospheric background. The IceCube experiment does not
have the sensitivity to detect neutrinos from the implosion of the earliest
stars, but a number of high-energy neutrinos may be detected from nearby long
GRBs. The cumulative signal should be detectable over several years ($\sim 10$
yr) of integration with the full 86-string configuration.