Sha256: 83a33cc544486ee486a99c65b5d30d93d3f253fc3f96304ba6c6a935bc44fe4f
Contents?: true
Size: 1.88 KB
Versions: 47
Compression:
Stored size: 1.88 KB
Contents
This subsection shows example 'config.ru' files for various web frameworks. ==== Camping ==== ------------------------------------------------------ require 'rubygems' require 'rack' require 'camping' ##### Begin Camping application Camping.goes :Blog ...your application code here... ##### End Camping application run Rack::Adapter::Camping.new(Blog) ------------------------------------------------------ For Camping versions 2.0 and up, using `run Blog` as the final line will do. ==== Halcyon ==== ------------------------------------------------------ require 'rubygems' require 'halcyon' $LOAD_PATH.unshift(Halcyon.root / 'lib') Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml' run Halcyon::Runner.new ------------------------------------------------------ ==== Mack ==== ------------------------------------------------------ ENV["MACK_ENV"] = ENV["RACK_ENV"] load("Rakefile") require 'rubygems' require 'mack' run Mack::Utils::Server.build_app ------------------------------------------------------ ==== Merb ==== ------------------------------------------------------ require 'rubygems' require 'merb-core' Merb::Config.setup( :merb_root => ::File.expand_path(::File.dirname(__FILE__)), :environment => ENV['RACK_ENV'] ) Merb.environment = Merb::Config[:environment] Merb.root = Merb::Config[:merb_root] Merb::BootLoader.run run Merb::Rack::Application.new ------------------------------------------------------ ==== Ramaze ==== ------------------------------------------------------ require "rubygems" require "ramaze" Ramaze.trait[:essentials].delete Ramaze::Adapter require "start" Ramaze.start! run Ramaze::Adapter::Base ------------------------------------------------------ ==== Sinatra ==== ------------------------------------------------------ require 'rubygems' require 'sinatra' require 'app.rb' run Sinatra::Application ------------------------------------------------------
Version data entries
47 entries across 47 versions & 7 rubygems