Use Screen To Bootstrap A Development Install (Ubuntu)

This tutorial was posted on discourse.sulliops.co on May 14, 2017.

When installing Discourse for development using this tutorial, the last step is to run bundle exec rails server --binding=0.0.0.0 to bootstrap the server. However, once you run this command you cannot do anything without first stopping the server using Ctl + C. But, there is a way to bootstrap the server and be able to return to a prompt (to do something else, I suppose).


Before starting this step, you should run cd to verify that you are in your root directory. Presuming this is a development installation, you will be using a non-root user account with sudo access. So, run sudo apt-get install screen and allow it to install. Once it has been installed, run screen -R and hit enter.

Then, continue the tutorial as normal, but after bootstrapping is complete (after running bundle exec rails server --binding=0.0.0.0) you can do Ctl + A then D. This will return you to your root directory prompt and you can do something else. If and when you need to return to your screen (where you bootstrapped Discourse), just do screen -R.

4 Likes

As an FYI, there is a screen defined already for use with vagrant. Iā€™m sure adding one for non-vagrant setups would be accepted as a PR

https://github.com/discourse/discourse/blob/master/docs/vagrant.screen

5 Likes