Thin
は、最近話題の軽量・高速が売りのWebサーバです。

Thin is a Ruby web server that glues together 3 of the best Ruby libraries in web history:

  • the Mongrel parser, the root of Mongrel speed and security
  • Event Machine, a network I/O library with extremely high scalability, performance and stability
  • Rack, a minimal interface between webservers and Ruby frameworks

ということで、
RailsアプリケーションでThinを使う方法をメモしておきます。
何はともあれ、まずはsudo gem install thin
thinをインストールします。
あとは、RAILS_ROOTで

shell>>
$ thin start
<<--

するだけでOKです。非常に簡単です。
thinコマンドのオプションは以下の通り。

pre>>
Usage: thin [options] start|stop|restart

Server options:
-a, --address HOST bind to HOST address
(default: 0.0.0.0)
-p, --port PORT use PORT (default: 3000)
-e, --environment ENV Rails environment
(default: development)
-c, --chdir PATH Change to dir before starting
-s, --servers NUM Number of servers to start
set a value >1 to start a cluster
-d, --daemonize Run daemonized in the background
-l, --log FILE File to redirect output
(default: log/thin.log)
-P, --pid FILE File to store PID
(default: tmp/pids/thin.pid)
-t, --timeout SEC Request or command timeout in sec
(default: 60)
-u, --user NAME User to run daemon as (use with -g)
-g, --group NAME Group to run daemon as (use with -u)

Common options:
-D, --debug Set debbuging on
-h, --help Show this message
-v, --version Show version
<<--

見ての通り、デフォルト設定はRailsアプリケーションに
最適化されています。

posted by genki genki on Sat 16 Feb 2008 at 12:48 with 0 comments
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
coffeescriptdefergroongajsmemonodenodejs
Comments rssrss
瀧内元気 瀧内元気: MacOS版は以下にあります genki/ViMouse 01/16 05:40
dsjf dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これでも出... 01/08 23:23
瀧内元気 瀧内元気: おお、チェックしてみます。thx! 12/24 05:23
overisland overisland: Reeder for iPhone もこの UI を実装していますね。 12/24 05:13
瀧内元気 瀧内元気: その情報は見たのですが、以下のサイトによると、現在はまた必要になってるっぽいんですよね。 http:... 12/01 12:20
tkawa tkawa: http://devcenter.heroku.com/articles/rails31_herok... 12/01 10:47
瀧内元気 瀧内元気: どもー。いまはgithubに置いてあります https://github.com/genki/irb... 07/10 08:31
ともち ともち: こんにちは! すばらしいプログラムをありがとうございます。しかし、merbiのドメイン、切れているみ... 07/10 02:30
Services from s21g
YOMU Web小説リーダー
小説投稿サイトの公式ページを開き、WebView表示と読み上げ向け表示を切り替えて、移動中や作業中にもWeb小説の続きを聴きやすくするiPhoneアプリです。
補助探
公開されている補助金・助成金情報を集約し、条件に合う制度を探しやすくするサービスです。
jotter.me
個人開発者のためのホスティング一体型ノートサービス
ハンドミラー
iPhone向けの手鏡アプリ
ツイプロ(twpro)
Twitterプロフィールの高速検索エンジン