Skip to content

Instantly share code, notes, and snippets.

@henadzit
Last active August 28, 2017 21:22
Show Gist options
  • Save henadzit/ee1a3593660aaa4ba36288752382908c to your computer and use it in GitHub Desktop.
Save henadzit/ee1a3593660aaa4ba36288752382908c to your computer and use it in GitHub Desktop.
Minimal one-page rails 5 application, run with `rackup -p 3030`
require "action_controller/railtie"
class TestApp < Rails::Application
secrets.secret_token = "secret_token"
secrets.secret_key_base = "secret_key_base"
config.logger = Logger.new($stdout)
Rails.logger = config.logger
routes.draw do
root "home#index"
end
end
class HomeController < ActionController::Base
def index
render inline: 'Hello, World!'
end
end
require './application'
run TestApp
source 'https://rubygems.org'
gem 'rails', '5.1.3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment