Top Level Namespace

Defined Under Namespace

Modules: HooksWrapper, Puma, Rails

Instance Method Summary collapse

Instance Method Details

#rails_port!Object

The Rails server command’s port will override ENV out of the box. However, Rails itself does not reasign back to ENV.



25
26
27
28
# File 'lib/puma/plugin/rails_nginx.rb', line 25

def rails_port!
  rails_port = Rails::Command::ServerCommand.new([], ARGV).options[:port]
  ENV["PORT"] = rails_port.to_s if rails_port
end