Every railroad corporation or lessees, receivers, or trustees of the corporation operating railroads within this state shall cause flagpersons or gates or other precautionary measures or appliances to be established or substituted wherever the railroads cross public highways, whenever and as often as in the opinion of the commission it is necessary for the safety of the public.
R.I. Gen. Laws § 39-8-9