#!/usr/bin/env ruby # coding: utf-8 require 'optparse' require 'rubygems' require 'ramaze' $LOAD_PATH.unshift __DIR__("../") require 'util/gem_manager.rb' require 'config.rb' require 'util/servant.rb' require 'controller/init' require 'model/init' def start_ramaze if Conf.debug Ramaze::Log.info "Starting Ramaze with dev mode" end Ramaze::Log.info "Starting Ramaze with port #{Conf.server_port}" Ramaze.start :port => Conf.server_port, :root => __DIR__("../"), :mode => (Conf.debug ? :dev : :live) end if defined?(TESTS_DIR) Thread.new{ start_ramaze } else start_ramaze end