The ultraviolet (UV) window has been largely unexplored through balloons for astronomy. We discuss here the development of a compact near-UV spectrograph with fiber optics input for balloon flights. It is a modified Czerny-Turner system built using off-the-shelf components. The system is portable and scalable to different telescopes. The use of reflecting optics reduces the transmission loss in the UV. It employs an image-intensified CMOS sensor, operating in photon counting mode, as the detector of choice. A lightweight pointing system developed for stable pointing to observe astronomical sources is also discussed, together with the methods to improve its accuracy, e.g. using the in-house build star sensor and others. Our primary scientific objectives include the observation of bright Solar System objects such as visible to eye comets, Moon and planets. Studies of planets can give us valuable information about the planetary aurorae, helping to model and compare atmospheres of other planets and the Earth. The other major objective is to look at the diffuse UV atmospheric emission features (airglow lines), and at column densities of trace gases. This UV window includes several lines important to atmospheric chemistry, e.g. SO2, O3, HCHO, BrO. The spectrograph enables simultaneous measurement of various trace gases, as well as provides better accuracy at higher altitudes compared to electromechanical trace gas measurement sondes. These lines contaminate most astronomical observations but are poorly characterized. Other objectives may include sprites in the atmosphere and meteor ashes from high altitude burn-outs. Our recent experiments and observations with high-altitude balloons are discussed.