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

The Archive Base Latest Questions

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

My webhost is Heroku, which does not allow files to be saved to the

  • 0

My webhost is Heroku, which does not allow files to be saved to the local file system. Therefore, I am using Carrierwave to store my files onto Amazon S3.

In the console, I notice when I do:

Photo.last.attachment.url

It returns:

 => "https://foobar.s3.amazonaws.com/uploads/users/1/photos/7/foo.jpg" 

As expected. However, this process (of returning the value) in the console takes up 2-3 seconds. My guess is that it it trying to access S3. Even worst, when I load a web page with several photos, it takes quite a while to load.

Someone mentioned that because I am remotely storing my files via S3, I should cache the result from “Photo.last.attachment.url“.

This means, in my db I would need to have two columns:

:attachment and :attachment_url

:attachment would be for the Carrierwave uploader object and :attachment_url would be the link to the S3 file directly.

Is this what I should be doing? Is there a better alternative?

  • 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-21T15:33:50+00:00Added an answer on May 21, 2026 at 3:33 pm

    This is fixed in a recent version of Carrierwave. Better not to cache, URL creation is cheap. It was a behavior of Fog to check for the file when creating the URL. Now the behavior is to simply give the link. You can see this discussion:
    https://github.com/jnicklas/carrierwave/issues/289 and
    https://github.com/jnicklas/carrierwave/issues/261

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

Sidebar

Related Questions

My free webhost appends analytics javascript to all PHP and HTML files. Which is
My free webhost appends analytics javascript to all PHP and HTML files. Which is
I'm trying to publish my website on a webhost which using plesk panel but
Using: Rails 3.0.3. Webhost: Heroku.com. 2 dynos & 0 worker. I am a bit
My webhost is 000webhost.com I've set up an FB app which needs to post
I have this web page that works fine in one webhost but not in
I'm trying to deploy my Rails app to my webhost (DreamHost) using Capistrano but
For some Webhost issues I have to write a file backup/syncronisation tool for a
My webhost has rules against socket servers so I've been looking into GAE. Does
Currently I'm using shared webhost (Linux) to host my site. I know that anything

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.