Report this

What is the reason for this report?

How to get into Rails console on App Platform

Posted on May 11, 2021

I have a Rails app deployed to Digitalocean App Platform but I cannot see a way to access to the rails console. If I go to “Console” on the web page and execute the console command the output is an error:

integer 2558122467 too big to convert to `int' (RangeError)

How do I access rails console for an app on App Platform? This is a deal breaker for me to not to use this service.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @beydogan

You can try to run the following command in the console to start it:

rails c -e p

If the issue persists then please feel free to contact support.

Best, Dikshith

@beydogan

I have the same issue while trying to launch any rails command. Have you found a workaround ?

Thanks,

Adrien

I believe this is related to the “ulimit” setting for the number of open files. The App Platform sets this limit to “unlimited”, but some gems try to convert this to a number, which fails.

To resolve this temporarily in the web-based console, so you’re able to open a Rails console, simply set the ulimit to a lower value, and fire up your console as normal.

ulimit -n 500000
rails c

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.