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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:15:47+00:00 2026-05-13T12:15:47+00:00

I used paper clip in my web application, I use this to make a

  • 0

I used paper clip in my web application, I use this to make a new product:

<% semantic_form_for @product do |f| %>  
  <% f.inputs do %>  
    <%= f.input :title %>  
    <%= f.input :price %>  
    <%= f.file_field :photo %>


    <%= f.input :category , :include_blank => false %>  
  <% end %>  
  <%= f.buttons %>  
<% end %>

And this to show product:

<% semantic_form_for @product do |f| %>  
<%= image_tag @product.photo.url%>

  <% f.inputs do %>  
    <%= f.input :title %>  
    <%= f.input :price %>  
    <%= f.file_field :photo %>

    <%= f.input :category , :include_blank => false %>  
  <% end %>  
  <%= f.buttons %>  
<% end %>

And his is my product.rb:

class Product < ActiveRecord::Base
  validates_presence_of :title, :price
  validates_numericality_of :price
  validates_uniqueness_of :title

  has_attached_file :photo
  attr_accessible :name, :category_id, :price, :title, :photo
  belongs_to :category
  has_many :order_items

end

But after I upload the photo, it show my image path like this :

http://localhost:3000/photos/original/missing.png

It seems that it can’t upload the photo with this error:

No route matches "/photos/original/missing.png" with

{:method=>:get}

  • 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-13T12:15:48+00:00Added an answer on May 13, 2026 at 12:15 pm

    I am not sure what semantic_form_for is, but with regular form_for, you have to explicitly say it’s a multipart form.

    <% form_for(@thing, :html => {:multipart => true}) do |f| %>
      ....
    

    If you don’t do this, the contents of your file upload fields won’t be transmitted to the server. It’s a HTML thing 😉

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

Sidebar

Related Questions

I used this white paper from MS for reference: http://msdn.microsoft.com/en-us/library/ms345117(v=sql.90).aspx However I get an
This question is from a past exam paper and it is used for revision
Used code I found on SO to use the COM based Acrobat Reader to
I used to use a guitar tab site and it had a feature where
For one specific client I have to use PHP. This and this question were
I used to use OpenC++ ( http://opencxx.sourceforge.net/opencxx/html/overview.html ) to perform code generation like: Source:
I have used Qt Creator and created my.exe file and a new extension .newext
This used to work alright. Now I am getting this error: rake/rdoctask is deprecated.
I have a git project that I used for a recently published scientific paper.
I’ve used Uploadify and paperclip in Rails3 and I’m getting this error - AWS::S3::NoSuchBucket

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.