The trick is to wrap the bad column names in double quotes. In other words, instead of using
SELECT foo, bar, order FROM baz;
which returns an error, use
SELECT foo, bar, "order" FROM baz;
In fact, looking through the schemas it appears that RoR wraps all the column names in quotes. I suppose this must be so that RoR developers can name their fields anything they want without having to worry about the underlying implementation in SQLite.