method

spawn

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: MongrelSpawner
spawn(port) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/commands/process/spawner.rb, line 58
  def self.spawn(port)
    cmd =
      "mongrel_rails start -d " +
      "-a #{OPTIONS[:address]} " +
      "-p #{port} " +
      "-P #{OPTIONS[:pids]}/#{OPTIONS[:process]}.#{port}.pid " +
      "-e #{OPTIONS[:environment]} " +
      "-c #{OPTIONS[:rails_root]} " +
      "-l #{OPTIONS[:rails_root]}/log/mongrel.log"

    # Add prefix functionality to spawner's call to mongrel_rails
    # Digging through monrel's project subversion server, the earliest
    # Tag that has prefix implemented in the bin/mongrel_rails file
    # is 0.3.15 which also happens to be the earilest tag listed.
    # References: http://mongrel.rubyforge.org/svn/tags
    if Mongrel::Const::MONGREL_VERSION.to_f >=0.3 && !OPTIONS[:prefix].nil?
      cmd = cmd + " --prefix #{OPTIONS[:prefix]}"
    end
    system(cmd)
  end
Register or log in to add new notes.