2012-04-10 4 views
0

heeey) ich eine Galerie zu machen versuchte, aber ich erhalte eine Fehlermeldung auf DateiGalerie fo bcms 3.3.3 Fehler - Ruby on Rails

Modell 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 

Modellbild hochladen! .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 

mir Hilfe plzzzz = (((

Antwort

0

Stellen Sie sicher, Tabellenfelder hat oder nicht.

Galerie:

:avatar_file_name 
:avatar_content_type 
:avatar_file_size 

Image:

:image_file_name 
:image_content_type 
:image_file_size 

Werfen Sie einen Blick auf Paperclip: Attaching Files in Rails

+0

yep, hat Tische alle Felder für Büroklammer ( –

+0

bitte Jungs helfen mir = (((( –

+0

) Können Sie mir bitte genau sagen, welchen Fehler Sie bekommen ... Keine Ahnung in das Protokoll, das Sie haben hat gegeben . – Vik