You will want to keep the secret keys and environment-specific configuration out of your code. You must store them in such a way that you can publish the source code in a public repository, such as github, without ignoring any files in the source control. This is the principle of a twelve-factor methodology.
In any case, to answer your question, you can add these keys as shell variables. This assumes that you are developing on * nix.
$ echo "export OAUTH_SECRET='kie92j8fKEHHE92Va1njk3'" >> ~/.bash_profile
Now in your Rails code, you have access to all environment variables:
ENV["OAUTH_SECRET"]
These environment variables can be set in a deployment script that requests them on the command line. It also allows each developer in your team to have their own keys.
source share