タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

rackとrailsに関するhoppieのブックマーク (1)

  • config.ruに設定を埋める

    Railsのコードを読んでみてて気付いた。いや、単に知らなかっただけという可能性もあるのだがconfig.ruには起動オプションを埋め込むことができる。 config.ruに一行、「#</tt>」で始まる文字列を書き加える。するとその内容が空白区切りでコマンドラインオプションに加えられる。 # This file is used by Rack-based servers to start the application. #\ --port 3333 require ::File.expand_path('../config/environment', __FILE__) run Nanjamonja::Application これを起動すると次のようになる。 $ ./script/rails server => Booting WEBrick => Rails 3.0.9 applic

    hoppie
    hoppie 2012/05/30
    つかえる
  • 1