The sqlite3 module allows Ruby programs to interface with the installed SQLite3 database engine.
As it interfaces with the installed library, we just need to use the modified SQLite engine containing litesync.
First follow the instructions to compile and install litesync or use the pre-compiled binaries for your platform.
Then follow the instructions in the sqlite3-ruby repository.
If the Ruby sqlite3 module is already installed then just installing litesync may be sufficient if the original SQLite files are overwritten at the installation.
To open the database we use a URI like this:
db = SQLite3::Database.new "file:test.db?node=secondary&connect=tcp://server:port"