Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9162129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:08:24+00:00 2026-06-17T14:08:24+00:00

I deploy my rails app onto Heroku, and I’ve set aws access keys on

  • 0

I deploy my rails app onto Heroku, and I’ve set aws access keys on the server as environment variables. However, to test my application in development environment, I need to initialize them somewhere on my local machine. So I decided to the following.

/config/initailizers/init_aws_locally.rb

ENV['AWS_ACCESS_KEY_ID'] = 'my key'
ENV['AWS_SECRET_ACCESS_KEY'] = 'my secret key'

This file is added in .gitignore

However, when I upload in development environment, I get this error message:

Missing required arguments: aws_access_key_id, aws_secret_access_key

I think somehow I overlooked a simple step to include my aws keys in my development environment. But I’m not sure why the reason for the error when I already initialized the keys.

For your reference, I’m using carrierwave, S3, and Fog.

config/initializers/fog.rb

CarrierWave.configure do |config|
  config.fog_credentials = {
    :provider               => 'AWS',                        # required
    :aws_access_key_id      => ENV['AWS_ACCESS_KEY_ID'],       # required
    :aws_secret_access_key  => ENV['AWS_SECRET_ACCESS_KEY'], # required
    :region                 => 'us-east-1',                  # optional, defaults to 'us-east-1'
  }
  config.fog_directory  = 'd'                         # required
  config.fog_public     = true                                # optional, defaults to true
end

Thank you. I appreciate your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:08:24+00:00Added an answer on June 17, 2026 at 2:08 pm

    I’d avoid putting any credentials in code. It’s such a terrible idea and Heroku has the right idea. So what I do is use RVM and put a file .rvmrc in my project folder. I put .rvmrc in .gitignore as well.

    Then you edit .rvmrc to have

    export AWS_ACCESS_KEY_ID=”BLAH”

    so on and so forth. Anytime I “cd” into this directory my env is setup for me for that project by RVM. If you’re not using RVM there is other alternatives out there.

    rails s

    and it will have all the environment variables setup that you put in your .rvmrc script. No need for initializer or development only yaml config files that you keep out of source control. From my experience this is the simplest solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am about to deploy a rails app (onto heroku) I made and
Everytime I try to deploy my rails app onto heroku it says Michael$ heroku
I've been wrestling with Capistrano, trying to deploy a test rails app for a
I have a rails app and I want to deploy it on a server
When I deploy my rails app (which uses restful_authentication), to Heroku, I get the
I'm trying to deploy a Rails app to a CentOS server running Passenger. The
I have recently decided to deploy my site test onto my home server using
All I'm trying to do is deploy my Rails app on Heroku with a
I'm trying to set up my VPS to deploy my Rails app, and I
I'm trying to deploy my first rails app on Heroku. I was using devise

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.