It seems that there is a permissions problem in your installation. We have a Support Tool that will gather relevant information for us to review your configuration. Could you please download and execute it on the machine where the stack is running by following the steps described in the guide below? You must click on the platform or cloud that you are using to find the correct instructions.
How to Run the Bitnami Support Tool
Please note that you need to paste the code outputted by the tool in your reply.
Installing the gem using sudo should not be the default option but there should not be any problem apart from permissions issues in case you need to update / edit that gem