How to get into Rails Console

I recently updated Discourse after being out of date for 6-7 months. I noticed ./launcher ssh app doesn’t work anymore and if I use enter app then rails c, I get an error.

root@rdu-forums-01-app:/var/www/discourse/plugins/categorywatcher# rails c

^C/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': Interrupt
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'

Has anyone seen this?

First of all, could you please wrap your console output in a code block instead of a quote block? There’s Markdown syntax being interpreted in there.


Secondly, no, I’m not seeing it.

notriddle@wsl:~$ ssh ubuntu@52.26.80.122
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-92-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

68 packages can be updated.
0 updates are security updates.


*** System restart required ***
Last login: Thu Jan  4 00:59:09 2018 from 70.184.74.19
ubuntu@ip-172-31-27-237:~$ sudo -i
root@ip-172-31-27-237:~# cd /var/discourse/
root@ip-172-31-27-237:/var/discourse# ls
bin  cids  containers  discourse-setup  image  launcher  README.md  samples  scripts  shared  templates  Vagrantfile
root@ip-172-31-27-237:/var/discourse# ./launcher enter app
root@ip-172-31-27-237-app:/var/www/discourse# rails c
[1] pry(main)>

It did take me like a minute after hitting enter at “rails c” before the pry prompt came up. Maybe wait longer?

5 Likes

Opening the rails console can take a while, depending on the work load of your application and server. This isn’t really app specific, you can see that with Gitlab too.

The exception you are seeing originates from Crtl+C (^C before the stacktrace), interpreted as interrupt signal by the current running process.

Just wait a little longer as @notriddle suggested :slight_smile:

Kind regards,
Michael

Working fine here, but does take a number of seconds (counted around 10 seconds) for the prompt:

root@discourse1-app:/shared/neo/bin# rails c

[1] pry(main)>
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.