Question

How to get into Rails console on App Platform

Posted May 11, 2021 391 views
Ruby on RailsRubyDigitalOcean App Platform

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.

1 comment
  • I’m also having this issue. It seems to be related to the ffi gem. If I remove the gem that has ffi as a dependency, I can access rails console.

    Are you using this gem as well?

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.

×
Submit an Answer
2 answers

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

  • Hello @dikshith thanks for the reply.

    I’ve just tried that and it doesn’t work, still the same error.

    RAILS_ENV is “production” anyways in the console so it is not needed to set environment explicitly.

@beydogan

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

Thanks,

Adrien

  • No I’ve spent more than necessary time on this and couldn’t find a solution. I’ve ended up stop using the app platform.

    • @beydogan ok.

      Maybe @dikshith has a solution for this bug ?

      It’s impossible to run any rails command.

      But, rails command do work in a job component (rails migration for exemple), any idea of what is happening on the worker and web service components ?

      Perhaps an issue with ffi ?

      I might end up by using an other PaaS if I can’t solve this bug as well…

      • Hey @beydogan and @adrilef

        I reached out to one of our engineering team members and got some insights into this issue. It’s not FFI issue directly. FFI just lets you include C libraries into ruby.

        The user “patMantaRay” has reported this issue here [1] and we did found a workaround for him. In their case, they have a gem that seems broken when the open file limit is set very high/unlimited.

        Please note this may or may not help in your use case, since FFI is pretty widely used. Errors in those third-party C libraries often look to users like errors in FFI because the ruby stack trace stops in FFI code, even though the actual bug is in the C library.

        [1] https://github.com/typhoeus/ethon/issues/182

        Regards,
        Dikshith