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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:57:45+00:00 2026-05-30T20:57:45+00:00

I am trying to upload a file from browser, then make one thumbnail from

  • 0

I am trying to upload a file from browser, then make one thumbnail from it, then upload both to s3.

 File.open(params[:file][:tempfile]) do |p|
      AWS::S3::Base.establish_connection!(
          :access_key_id     => settings.s3_key,
          :secret_access_key => settings.s3_secret)
      AWS::S3::S3Object.store(pic_name,p,settings.bucket,:access => :public_read)

      thumb = Magick::Image.read(p)
      thumb.crop_resized!(75, 75, Magick::NorthGravity)

      AWS::S3::Base.establish_connection!(
          :access_key_id     => settings.s3_key,
          :secret_access_key => settings.s3_secret)
      AWS::S3::S3Object.store(pic_name + "s",thumb,settings.bucket,:access => :public_read)

I have tried most of the possible code combinations to make it work, but it gives me a segmentation error

c:0060 p:---- s:0261 b:0261 l:000260 d:000260 CFUNC  :read
c:0059 p:0117 s:0257 b:0257 l:002638 d:000256 BLOCK  /Users/gkay/Documents/yirmiyedi/web/banne/app/controllers/firsat.rb:33
c:0058 p:---- s:0253 b:0253 l:000252 d:000252 FINISH
c:0057 p:---- s:0251 b:0251 l:000250 d:000250 CFUNC  :open
c:0056 p:0190 s:0247 b:0247 l:002638 d:000246 LAMBDA /Users/gkay/Documents/yirmiyedi/web/banne/app/controllers/firsat.rb:27

So it starts when RMagic tries to open the file. I have tried many stuff like

thumb = Magick::Image.read(p).first or [0] etc but none of them worked.

Any ideas?
params[:file] is the post param which keeps the file

  • 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-30T20:57:47+00:00Added an answer on May 30, 2026 at 8:57 pm

    I’d suggest using Mini Magick instead – it uses a lot less memory and it’s much less buggy. We’ve had a lot of problems with RMagick, but none with mini magick. And switching from one to the other is very easy.

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

Sidebar

Related Questions

Anyway, I'm trying to upload a file from the browser and then read it
I am trying to upload a PDF file from the browser using Spring's CommonsMultipartResolver
I am trying to upload a file from a flash widget to my rails
I'm trying to upload a huge file from my Nokia N95 mobile to my
I'm trying to upload a file via FTP from my local computer to an
I am trying to find out how to upload a file from a web
I'm trying to extend a form and add an upload file field from within
I am trying to do a file upload from gwt-ext without bringing up the
I'm trying to upload a file from a phonegap app on my blackberry device
I am trying to upload a file from a php form. I have verified

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.