Skip to content

Instantly share code, notes, and snippets.

@dgb
Created November 21, 2011 18:35
Show Gist options
  • Save dgb/1383463 to your computer and use it in GitHub Desktop.
Save dgb/1383463 to your computer and use it in GitHub Desktop.
Single file Rails application
require "action_controller/railtie"
class Application < Rails::Application
config.session_store :cookie_store, :key => '_rails_session'
config.secret_token = '095f674153982a9ce59914b561f4522a'
end
class PagesController < ActionController::Base
def index
render :text => "Hello, world!"
end
end
Application.routes.draw do
get '/' => 'pages#index'
end
require './application'
run Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment