Created
July 27, 2017 17:38
-
-
Save cbilgili/1d6b9b1538996c7813e869c7ffc97b4b to your computer and use it in GitHub Desktop.
How to keep rails command from Rails Console running after SSH Client (PuTTy) closes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use sudo apt-get install screen to install screen. Then run it using screen. Now you have a separate console window which can be detached using Ctrl + A, then D. Closing putty will not end your screen-session. If you log back in at any later point, you may resume the sessions using screen -r. | |
To summarize: | |
> sudo apt-get install screen | |
> screen | |
# pops up a new shell | |
> rails c | |
# run your reindex operation | |
# press Ctrl + A, then D | |
> exit | |
# putty closes | |
# reconnect using putty | |
> screen -r | |
# you should be back in your rails console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment