Need your help to solve the issue during Installation

Normally no need for ruby. You happened on say this prompt sudo apt install ruby-active-model-serializers

That’s an install misstep on your part, so best repeat your install.

To learn more check here Manual bench install error - what's this no Ruby required? - #6 by clarkej