Vagrant – Running Rails server in the background
<p> It is pretty easy. First, let’s create a function for the script block. Put following code on the top of the Vagrant file. </p> </div> </div> </div> <div id="panel-1302-0-0-1" class="so-panel widget widget_sow-editor" data-index="1" data-style="{"background_display":"tile"}" > <div class="so-widget-sow-editor so-widget-sow-editor-base"> <div class="siteorigin-widget-tinymce textwidget"> <pre>def start_rails_server <<-SHELL cd /vagrant start rails server as a daemon to kill: sudo kill cat tmp/pids/server.pid rails s -d SHELL end <div id="panel-1302-0-0-2" class="so-panel widget widget_sow-editor" data-index="2" data-style="{"background_display":"tile"}" > <div class="so-widget-sow-editor so-widget-sow-editor-base"> <div class="siteorigin-widget-tinymce textwidget"> <p> Now in the Vagrantfile configuration block, use the script function and set it to run always....