# Switching Google Maps API Key from Deplyoment to Production

**URL:** <https://www.ruby-forum.com/t/switching-google-maps-api-key-from-deplyoment-to-production/137293>\
**Category:** Rails\
**Created:** [May 11, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/switching-google-maps-api-key-from-deplyoment-to-production/137293 "2008-05-11T16:05:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjglazer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Post date:** [May 11, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/switching-google-maps-api-key-from-deplyoment-to-production/137293/1 "2008-05-11T16:05:18Z")

</div>

Hi there everyone,

I have a rails app that used Google Maps in some of the views. In order  
to use it I have to include the following code at the top of my view:

However, I have two separate keys - one for production and one for  
development. What is the best way to organize them so that when I use  
Capistrano to upload my app and run it in production mode the correct  
API key gets loaded?

Thanks,

Stephen
