19th Thu
thinでmerbをrackupする方法のメモ
thinを使ってmerbアプリケーションをrackupする方法のメモです。
以下のようなconfig.ruファイルを用意します。
ruby>>
config.ru
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
use Merb::Rack::Static, Merb.dir_for(:public)
run Merb::Rack::Application.new
<<--
あとは、以下のようなコマンドで起動します。
pre>>
% RACK_ENV=development thin -R config.ru start
<<--
posted by
genki on Thu 19 Feb 2009 at 02:47 with 0 comments