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

  • Home
  • SEARCH
  • 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 6766371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:49:21+00:00 2026-05-26T14:49:21+00:00

I am using the carrierwave gem to manage file uploads in my rails 3

  • 0

I am using the carrierwave gem to manage file uploads in my rails 3 app, however, I am not able to connect to my amazon s3 bucket.

I have followed the instructions on the wiki yet they are not quite detailed enough, for example where do I store my s3 credentials?

  • 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-05-26T14:49:22+00:00Added an answer on May 26, 2026 at 2:49 pm

    Put something like this in an initializer.

    CarrierWave.configure do |config|
      config.storage = :fog
      config.fog_directory = 'your_bucket'
    
      config.fog_credentials = {
        :provider => 'AWS',
        :aws_access_key_id => 'your_access_key'
        :aws_secret_access_key => 'your_secret_key',
        :region => 'your_region'
      }
    end
    

    You can store your credentials right in the file, if you want (and the code is private). Or from a separate file, or the database, up to you. The following would load a config file and allow different configurations based on the env.

    # some module in your app
    module YourApp::AWS
      CONFIG_PATH = File.join(Rails.root, 'config/aws.yml')
    
      def self.config
        @_config ||= YAML.load_file(CONFIG_PATH)[Rails.env]
      end
    end
    
    # config/aws.yml
    base: &base
      secret_access_key: "your_secret_access_key"
      access_key_id: "your_access_key_id"
      region: your_region
    development:
      <<: *base
      bucket_name: your_dev_bucket
    production:
      <<: *base
      bucket_name: your_production_bucket
    
    # back in the initializer
    config.fog_directory = YourApp::AWS.config['bucket_name']
    # ...
    config.fog_credentials = {
      :provider => 'AWS',
      :aws_access_key_id => YourApp::AWS.config['access_key_id'],
      :aws_secret_access_key => YourApp::AWS.config['secret_access_key'],
      :region => YourApp::AWS.config['region']
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the carrierwave gem with Rmagick in a Rails app. I've set
I'm trying to import a CSV file to my Rails app that's using CarrierWave
Hi I'm currently using carrierwave on my rails app without Amazon S3 or any
I'm currently using Rails 3.2 with the Carrierwave gem to upload files to Amazon
Right now in my rails app I'm using Carrierwave to upload files to Amazon
Using CarrierWave and Amazon S3, I'm able to store images from local files, but
I'm using CarrierWave / Fog in a Rails application to upload videos to Amazon
I'm using the carrierwave gem to upload file attachments to Google cloud storage. This
I am using Rails 3 and carrierwave gem. My problem is the next: I
I am not using carrierwave or paperclip for my file upload. I want to

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.