Let the SQLite rake tasks run without rails

This is a fix for #11697
When using the SQLite database tasks without the `Rails` module loaded, it failed, as the initializer relies on it.