rails 4 support

Signed-off-by: Jun Li <jun@quandl.com>