In MRI, st.h is included in intern.h which is included in ruby.h. However, we do not include st.h in Rubinius. Since st_* functions are used, st.h should be explicitly included.
Alternatively, I'd suggest not using st_* functions at all. They are very much an implementation detail of MRI.
The include of st.h is the only blocker for building the pg gem under Rubinius 1.9 mode: