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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:56:36+00:00 2026-05-24T11:56:36+00:00

Carrierwave by default takes in the url generated by store_dir in the uploader and

  • 0

Carrierwave by default takes in the url generated by store_dir in the uploader and prepends the path to the public folder of the rails application and stores the files.

For example if

def store_dir
  "uploads/#{model.id}"
end

then the file is stored at public/uploads/:attachment_id

If one tries to move the stored files out of the public folder still it saves in the public folder. Does anyone have an idea of how to store the files outside the public folder??

  • 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-24T11:56:37+00:00Added an answer on May 24, 2026 at 11:56 am

    the cleanest way to do this, is by setting the CarrierWave root option

    CarrierWave.configure do |config|
      config.root = Rails.root
    end
    

    then store_dir will be used inside this root.

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

Sidebar

Related Questions

I am trying to set CarrierWave's default url inside of the CarrierWave uploader. To
I'm using CarrierWave / Fog in a Rails application to upload videos to Amazon
I'm making a rails 3.1 app using carrierwave to upload files to aws s3.
I see by default carrierwave does not delete files linked to model. How to
I have a small Rails 3.2.1 app that uses CarrierWave 0.5.8 for file uploads
I have an application that is using both the carrierwave & tire gems. The
I am building a custom image upload form in Rails 3 (paperclip / carrierwave
Not setting default_locale in Rails 3.1.3 application.rb: config.i18n.default_locale = :en I have got 3
I'm using CarrierWave to store files in gridfs, but having problems with opening them
I am using the carrierwave gem to manage file uploads in my rails 3

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.