Class: Rack::Handler::Passenger

Inherits:
Object
  • Object
show all
Defined in:
lib/passenger/rails.rb

Class Method Summary collapse

Class Method Details

.environmentObject



20
21
22
# File 'lib/passenger/rails.rb', line 20

def environment
  ENV['RACK_ENV'] || ENV['RAILS_ENV']
end

.run(app, options = {}) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/passenger/rails.rb', line 11

def run(app, options = {})
  port = "-p #{options[:Port]}"
  address = "-a #{options[:Host]}"
  rack_up_file_path = "-R #{options[:config]}"
  env = "-e #{environment}"

  system "passenger start #{port} #{address} #{rack_up_file_path} #{env}"
end