Welcome to Microsoft Q&A. Thanks for posting a good question.
Apologies for the delay! You can try "bundle exec rails console" from ssh. Note that Ruby apps must be deployed with all the required gems. This guide provides key concepts and instructions for Ruby developers who use a built-in Linux container in App Service.
Kindly let us know if it helps or you need further assistance, we will be more than happy to assist you further. Please do share more details on your requirement.