ported php version to rails