# Initializer

**URL:** <https://www.ruby-forum.com/t/initializer/159367>\
**Category:** Rails\
**Created:** [February 3, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/initializer/159367 "2009-02-03T22:27:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [February 3, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/initializer/159367/1 "2009-02-03T22:27:05Z")

</div>

Have an app that works fine in development but not production behind  
pound that uses Geokit. I’ve figured out the API key is wrong. is  
there a way to configure each mongrel with a different API key? if  
there a variable i can check in the initializer and provide the right  
API key for that port since it’s going to be based on the internal  
address:port the connection is on?

---

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [February 3, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/initializer/159367/2 "2009-02-03T22:42:25Z")

</div>

here’s an example of how the port number can be accessed

\*[http://pastie.org/169850](http://pastie.org/169850)

al  
\*  
On Tue, Feb 3, 2009 at 1:26 PM, spokra [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Have an app that works fine in development but not production behind  
> pound that uses Geokit. I’ve figured out the API key is wrong. is  
> there a way to configure each mongrel with a different API key? if  
> there a variable i can check in the initializer and provide the right  
> API key for that port since it’s going to be based on the internal  
> address:port the connection is on?
> 
> >

–  
Available for Ruby on Rails development opportunities
