We have studied the rationally frustrated Josephson-junction array model in the square lattice through Monte Carlo simulations of the (2+1)-dimensional XY model. For frustration f=1/4, the model at zero temperature shows a continuous superfluid-insulator transition. From the measurement of the correlation function and the superfluid stiffness, we obtain the dynamical critical exponent z=1.0 and the correlation length critical exponent nu=0.4+/-0.05. While the dynamical critical exponent is the same as that for cases f=0, 1/2, and 1/3, the correlation length critical exponent is surprisingly quite different. When f=1/5, we have the nature of a first-order transition.