Config.ru
In config.ru
file loads up the gem bundler and runs the rack application.
# Load Ruby Gems
require 'bundler'
Bundler.require
Loader.autoload
# Load App
require './app.rb'
run AppName
Load Ruby Gems
Ensures you’re loading Gemfile defined gems.
Load App
Require the app.rb
file and then run the application to web server with run AppName
.
Note: it is recommended that you change the
AppName
for your projects. Make sure to change them in both config.ru and app.rb files.