Use Screen To Bootstrap A Development Install (Ubuntu)

This tutorial was posted on on May 14, 2017.

When installing Discourse for development using this tutorial, the last step is to run bundle exec rails server --binding= 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= 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.


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