Pratik Naik氏による1ファイルで出来たRailsアプリケーション。

Single file Rails Application

Just for fun and profit

Thinを使ってますね。

Rails App Golfとかやったら面白いかもしれません。 Railsアプリとは何かという、ちょっと哲学的な問題に突き当りそうですが。

posted by Png genki on Sat 16 Feb 2008 at 16:55

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

   1  $ thin start

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

   1  Usage: thin [options] start|stop|restart
   2  
   3  Server options:
   4    -a, --address HOST     bind to HOST address
   5                           (default: 0.0.0.0)
   6    -p, --port PORT        use PORT (default: 3000)
   7    -e, --environment ENV  Rails environment
   8                           (default: development)
   9    -c, --chdir PATH       Change to dir before starting
  10    -s, --servers NUM      Number of servers to start
  11                           set a value >1 to start a cluster
  12    -d, --daemonize        Run daemonized in the background
  13    -l, --log FILE         File to redirect output
  14                           (default: log/thin.log)
  15    -P, --pid FILE         File to store PID
  16                           (default: tmp/pids/thin.pid)
  17    -t, --timeout SEC      Request or command timeout in sec
  18                           (default: 60)
  19    -u, --user NAME        User to run daemon as (use with -g)
  20    -g, --group NAME       Group to run daemon as (use with -u)
  21  
  22  Common options:
  23    -D, --debug                      Set debbuging on
  24    -h, --help                       Show this message
  25    -v, --version                    Show version

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

posted by Png genki on Sat 16 Feb 2008 at 12:48

ウノウラボさんで面白いイベントをやってるので参加してきます。

気分をかえてウノウで趣味の開発してみませんか?

さて、そういうこともあり、週末会社があいている時間を利用していろいろな人と一緒に、内容はばらばらでも開発してみたいよねという話を社内でしてみたところ意外と盛り上がり、うまいこと許可もとれたので、一日だけ皆さんの開発場所としてウノウを提供させていただこうと思います。

追記

ということで、参加してきました。

懇親会の様子

いわゆる勉強会とは違って、みんな黙々と作業をしているのが新鮮でした。 以下箇条書きでメモ・感想など。

  • 元同僚のonk氏がRailsを勉強しに着ていた
  • スクレイピングの人といろいろ話ができて面白かった
  • Mackbook Air人気
  • 「VistaからXPにアップグレード」
  • デバイスを作るのはやっぱり面白そうだ
  • 下北沢(うちの隣の駅)の会社のCTOさんと会った
  • KLabは「クラブ」
  • 手羽先は蟹に通じるものがある(食べてると沈黙する)
  • 宗教論争(エディタ、80桁制約、タブの数、Mac/Win and so on...)

全然関係ないけれど、ツインスパークさんと同じ建物なんですねー。

posted by Png genki on Sat 16 Feb 2008 at 10:05

This is a memo of an idea that I'd wanted to do for about a year since my starting to write some codes for a comet server.

By using Comet, JavaScript tests by various browsers can be automated. It's sure to be able to do even by any browsers to say nothing of the Firefox with MozRepl.

I've said in each place about this, but it has been hard to make a time to touch it, because too many exciting ideas struggled in my brain to make my hands type them out.

I wrote this entry with a hope that it might be going to be done by someone else.

posted by Png genki on Sat 16 Feb 2008 at 06:11
Contents
1ファイルで出来たRailsアプリケーション
軽量・高速WebサーバThinを使う手順のメモ
サタデー・コード・フィーバーに参加しました
Automating Cross Browser Tests of JavaScript by Using Comet
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
瀧内元気: おお、チェックしてみます。thx! '11-12
overisland: Reeder for iPhone もこの UI を実装していますね。 '11-12
瀧内元気: その情報は見たのですが、以下のサイトによると、現在はまた必要になってるっぽいんですよね。 ... '11-12
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ