String.chomp! might return a nil value but String.chomp always return a ...

...String

When detecting prunsrv_path, .chomp! might return a nil.
You can't call .empty? on nil.