Fix Rails being initialized more than once