fix rails dependency and style fixes