Fixes broken initialization logic for rails projects