The pulse-tube cooler that works based on the thermoacoustic effect offers several advantages such as high stability with a long operating time, portability with small size and weight, and low vibration. Taking advantage of these benefits, we present a high-pressure cryostat designed based on the pulse-tube cooler. The pulse-tube cryostat is compatible with standard diamond anvil cell (DAC), integrated with the gas membrane for remote pressure control. It can quickly cool the sample in a DAC below 100 K and be used portably for various in situ high-pressure characterization, including optical spectroscopy in the laboratory and x-ray scattering in synchrotron light sources. Compared with liquid cryogen flow cryostats, it exhibits high stability and can work for long times (several days) without consuming liquid nitrogen or helium. By using this device, we have studied the effect of high pressure and low temperature on the fluorescent behavior of ruby in DAC with silicone oil as a pressure-transmitting medium. The results demonstrate that the pulse-tube cryostat provides an alternative cooling method and may find more applications in the high-pressure DAC field due to its compactness and portability.