Vagrant – Running Rails server in the background

<p> It is pretty easy. First, let&#8217;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="{&quot;background_display&quot;:&quot;tile&quot;}" > <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="{&quot;background_display&quot;:&quot;tile&quot;}" > <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....

October 18, 2017 · Sinaru Gunawardena

Setting up Ruby SDK for RubyMine with Vagrant

This article is about how you can configure to use the Ruby SDK in your Vagrant image with RubyMine. For this, I have used the joshfng/railsbox Vagrant image because I was using that image for a Rails project. First you have to find where is your Ruby interpreter located for your project. Let’s assume your project lies in the same folder where you have Vagrantfile. In this case, by default the /vagrant folder in the vagrant image will contain your code....

October 12, 2017 · Sinaru Gunawardena