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 9075771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:56:39+00:00 2026-06-16T18:56:39+00:00

I am using Heroku and S3 with my Rails app. I only have the

  • 0

I am using Heroku and S3 with my Rails app. I only have the fog gem installed in production mode because my local computer is a piece of junk. Anyway, it works fine this way and has proven to be the better solution than pulling my hair out to get fog installed locally, but now I have to switch the Uploader file to use localhost and then switch it back to make a commitment.

It would be nice to be able to use file locally and then fog in production mode without manually switching back and forth. Does anyone have any suggestions about how to do this?

Thanks a lot in advance.

  • 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-16T18:56:41+00:00Added an answer on June 16, 2026 at 6:56 pm

    This is pretty easy. You have to define it in the configuration file. But don’t define the storage in your models as this would override the settings from config file.

    # sample config/initializers/carrierwave.rb
    CarrierWave.configure do |config|
    
      if Rails.env.development? || Rails.env.test?
        config.storage = :file
      else
        config.fog_credentials = {
          :provider               => 'AWS',
          :aws_access_key_id      =>  'some_access_key_id',
          :aws_secret_access_key  => 'some_secret_key',
          :region                 => 'eu-west-1'
        }
        config.storage = :fog
        config.fog_directory = 'bucket_name'
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Heroku and have a Rails app that is stable (production env), so
I have a rails app running on Heroku. I am using paperclip for some
I have a Rails app parsing incoming e-mails on Heroku using the Cloud-mailin add-on.
I have a Rails app on Heroku using the Postgres 9 beta. I've tried
I just deployed my Rails app to Heroku, but the Javascripts that were using
I would like to have different applications under the same domain using Heroku. Because
We are using Rails 3.0.X and running our web app on Heroku. We are
I am using heroku with Ruby on Rails. The data for my app however
I have a rails app on Heroku (cedar env). It has a page where
I deployed a Ruby on Rails app to Heroku, and I realized they have

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.