Fix Rails integration