HomeFreeBSD

In preparation for gitlab 11.7 upgrade switch rails4 to rails50.

Description

In preparation for gitlab 11.7 upgrade switch rails4 to rails50.
If required upgraded version to work correctly with rails50.
Fixed some cosmetic issue to make portlint happy.

Reviewed by: sunpoet
Differential Revision: https://reviews.freebsd.org/D18957