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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:01:30+00:00 2026-06-13T02:01:30+00:00

Does anybody know how to upload a document to later show in a Rails

  • 0

Does anybody know how to upload a document to later show in a Rails application (as text)? Is Paperclip the right gem to do this? If it is how? (I have uploaded images before with Paperclip).

  • 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-13T02:01:31+00:00Added an answer on June 13, 2026 at 2:01 am

    I like Paperclip. It seems well documented, and has worked well for everything I have needed. (I don’t personally know any of them, but the clever folks at Thoughbot have created some pretty useful stuff, for which I feel indebted to them).

    Obviously, you need to add Paperclip to your Gemfile, and (if you are using bundler) do your bundle install

    1. Add to your model

      has_attached_file :aFile
      
    2. Add to you controller something to catch whatever you name it in your view (probably in your create and update methods)

      @profile.aFile = params[:profile][:aFile]
      
    3. Probably should check for its existence, if it is a required param

      if params[:profile][:aFile].blank?
        redirect_to @profile
      else
        render :action => 'do_something_interesting_with_file'
      end
      

    And that’s about it. Don’t forget your config entries. For example, if you are using some kind of post-processing on the file

      Paperclip.options[:command_path] = "/opt/local/bin/"
    

    I found this to be extraordinarily helpful

    RailsCast by Ryan Bates

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

Sidebar

Related Questions

does anybody of you know a way to show the Upload Progress in Internet
does anybody know a good client-side, resize-before-upload, flash/java uploader? We need this terribly on
Does anybody know why this function, when passed an invalid date (e.g. timestamp) to
Does anybody know how to programmatically disable the keyboard individual letter pop-up? (This blue
HI, does anybody know if there's any option to show a real progress bar
Does anybody know whether this can be achieved in jQuery. Target/addClass to the last
Does anybody know how to upload local KML file from android to Google account
Does anybody know if there is a way of having an image upload field
Does anybody know how they do multi file upload using only Javascript only and
Does anybody know of an easy way to upload files to a remote server

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.