Fixed Rails installation error
Added port collision detection