The LooserTypecasting extension changes the float and integer typecasting to use the looser .to_f and .to_i instead of the more strict Kernel.Float and Kernel.Integer. To load the extension into the database:
DB.extension :looser_typecasting