The successful synthesis of two-dimensional (2D) boron sheets typically relies on the utilization of a silver surface, which acts as a gated substrate compensating for the electron-deficiency of boron. However, how the structures of one-dimensional (1D) boron are affected by the gating effect remains unclear. By means of an unbiased global minimum structure search and density functional theory (DFT) computations, we discovered the coexistence of 2D boron sheets and 1D ribbons triggered by electrostatic gating. Specifically, at a low excess charge density level (<0.1 e per atom), 2D boron sheets dominate the low energy configurations. As the charge density increases (>0.3 e per atom), more 1D boron ribbons emerge, while the number of 2D layers is reduced. Additionally, a number of low-lying 1D boron ribbons were discovered, among which a flat borophene-like ribbon (FBR) was predicted to be stable and possess high mechanical strength. Moreover, the electride Ca2N was identified as an ideal substrate for the fabrication of the FBR because of its ability to supply a strong electrostatic field. This work bridges the gap between 2D and 1D boron structures, reveals the polymorphism of 1D boron ribbons under the electrostatic gating effect, and in general provides broad implications for future synthesis and applications of low-dimensional boron materials.