In db2 connector, according to its documentation, user name and password are optional; however, if they are not specified in the database.yml file an invalid use of nil occurs in Connection#connect. Attached if a very simple patch to avoid this error (I just to_s the params making the user name/password fields empty strings if they were nil, which by the way is the default arguments for the function as well).
I was unsure how to insert a connection specific unit test (and create a test database without a user name/password to show the working case), so I was unable to create a test case to demonstrate and verify the problem resolution.