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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:34:18+00:00 2026-06-01T22:34:18+00:00

heeey!) I was trying to make a gallery but i get an error on

  • 0

heeey!)
I was trying to make a gallery but i get an error on file upload

model gallery.rb

class Gallery < ActiveRecord::Base  
  acts_as_content_block
  has_attached_file :avatar, :styles => { :thumb => "291x191#" }

  #attr_accessible :images
  has_many :images
  accepts_nested_attributes_for :images, :allow_destroy => true
end

model image.rb

class Image < ActiveRecord::Base
belongs_to :gallery
#acts_as_content_block :belongs_to_gallery => true
 has_attached_file :image, :styles => { :large => "640x480", :medium => "300x300>", :small => "100x100>" }
end

_form.html.erb

<p> Hello world!</p>

<%= f.cms_text_field :name %>
<%= f.cms_text_area  :description %>
<%= f.cms_file_field :avatar, :label => "Avatar" %>

<% f.object.images.build %>
<%= f.fields_for :images, :html => { :multipart => true } do |image| %>
 <%= image.file_field :image, :label => "Child Avatar" %>
<% end %>

========================================================

Started POST "/cms/galleries/14" for 91.2**.41.*** at 2012-04-10 01:28:14 +0400
  Processing by Cms::GalleriesController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"ziD3527h0JynfX05FcpnVgjsPSz2rGP4MKbEDmOun4U=", "gallery"=>{"lock_version"=>"0", "connect_to_page_id"=>"", "connect_to_container"=>"", "name"=>"Галерея", "description"=>"", "images_attributes"=>{"0"=>{"image"=>#<ActionDispatch::Http::UploadedFile:0x000000047a2570 @original_filename="загруженное.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"gallery[images_attributes][0][image]\"; filename=\"\xD0\xB7\xD0\xB0\xD0\xB3\xD1\x80\xD1\x83\xD0\xB6\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xB5.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/tmp/RackMultipart20120410-18330-3iyv20>>}}, "publish_on_save"=>"true"}, "id"=>"14"}
Command :: identify -format %wx%h '/tmp/загруженное.jpg20120410-18330-4sshl[0]'
Command :: convert '/tmp/загруженное.jpg20120410-18330-4sshl[0]' -resize "640x480" '/tmp/загруженное20120410-18330-tfa27r'
Command :: identify -format %wx%h '/tmp/загруженное.jpg20120410-18330-4sshl[0]'
Command :: convert '/tmp/загруженное.jpg20120410-18330-4sshl[0]' -resize "300x300>" '/tmp/загруженное20120410-18330-h8iclv'
Command :: identify -format %wx%h '/tmp/загруженное.jpg20120410-18330-4sshl[0]'
Command :: convert '/tmp/загруженное.jpg20120410-18330-4sshl[0]' -resize "100x100>" '/tmp/загруженное20120410-18330-el6pk'
Redirected to http://*********/cms/galleries/14
Completed 302 Found in 218ms

Help me plzzzz =(((

  • 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-01T22:34:20+00:00Added an answer on June 1, 2026 at 10:34 pm

    Make sure table has fields or not .

    Gallery :

    :avatar_file_name
    :avatar_content_type
    :avatar_file_size
    

    Image :

    :image_file_name
    :image_content_type
    :image_file_size
    

    Take a look on Paperclip: Attaching Files in Rails

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

Sidebar

Related Questions

Heey I want to make a netservice where more ipads can connect to at
I create select element dynamically using jquery, and I want to make action when
When creating a titlebar with a button, which is common in all activities e.g.
When creating a titlebar with a button, which is common in all activities e.g.
Heey, In my iPad application I have a UIPopoverController with a UIViewController containing some
Hi everyone I have a problem with MVC3 routing and areas: My route matches
I believe you can add objects use list.add(); However, is there an alternative way
<!DOCTYPE html> <html> <head> <title>Title</title> <meta http-equiv=content-type content=text/html; charset=utf-8> <style type=text/css> body { background:
Heey, I can localize my iPhone app with the systems local by localizing the
heey, i am doing a project for school witch includes a login in asp.net

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.