Fix error when rails started in production model.