Using the SqlBypass as a session store requires you to set the connection, even if you want to use the default connection. This issue was brought up in http://dev.rubyonrails.org/ticket/5490 , but the bug was resolved as "won't fix" because the proposed solution would always consume a database connection (even if the class was not used).
I have created a patch (with test) which proposes an alternate solution for this problem. In my solution, the code will use the default connection if it is not set when the #find_by_session_id method is invoked. The patch is simple, and just replaces direct access to the @@connection variable with a call to the connection method. This method already uses the default connection if not set, so the change in behavior makes the class act more consistent with itself. This allows the use of SqlBypass without the need to explicitly set the connection, but it will not make the database connection unless the class is actually used.
I have only patched #find_by_session_id because that change met my needs, but it might also be a good idea to change the other methods which access the class variable directly with calls to the method.