So I would like my Rails app instances to register themselves on a \"I\'m up\" kind of thing I\'m playing with, and I\'d like it to be able to mention what local port it\'s
Two ways.
If you're responding to a request in a controller or view, use the request object:
request.port
If you're in an initialiser and don't have access to the request object use the server options hash:
Rails::Server.new.options[:Port]