From: marco Date: 2007-01-03T20:45:09+09:00 Subject: Re: address server Frederic Jean wrote: > I'm going to make the assumption that we are talking about a Rails app. The > easiest way I found was to call request.host_with_port within a controller > or a view. This will return the host name and the port number (if provided). > > I use this approach to figure out which Google Maps api key to use in my > application (one for development work, another one for the "production" > site). Me too. This was my trouble. > > There is a very active mailing list for Ruby on Rails. You can get details > on how to subscribe by going to > http://groups.google.com/group/rubyonrails-talk?hl=en . > > Hope this helps. > > Fred > I find this method "request.env" who return a hash of all information : request.env["SERVER_NAME"] and ["SERVER_PORT"] Thank for your helps Marco