By Jack Szwergold • September 20, 2015

Install required Ruby GEMs for the test web application install.

sudo gem install rack sinatra bundler --no-rdoc --no-ri

Launching a file manually.

First, go into the ruby_test directory:

cd ~/ruby_test

Make sure there is a which has contents like this; this is for a simple Sinatra app:


# Set the required GEMs.
require "sinatra"

# Require the app.
require './bin/app.rb'

# Run the Sinatra app.
run Sinatra::Application

Now run the applictation like this:


For Sinatra a port can be specified with the -p flag like this which overrides the settings:

rackup -p 3333

Or it could even be manually launched directly through ruby like this:

ruby bin/app.rb