Hi all, I''ve installed paperclips but paperclip is not saving the files my model has has_attached_file :attachment,:styles => { :medium => "300x300>", :thumb => "100x100>" } and i have db migration as class AddAttachmentToPolicies < ActiveRecord::Migration def self.up add_column :policies, :attachment_file_name, :string add_column :policies, :attachment_content_type, :string add_column :policies, :attachment_file_size, :integer end def self.down remove_column :policies, :attachment_file_name remove_column :policies, :attachment_content_type remove_column :policies, :attachment_file_size end end and I have that plugin as well but its not saving the files and I''m getting values as null in my DB for the above set feilds Plz help me in this regard
we probably need to see your controller code first On Thu, Sep 3, 2009 at 10:08 PM, Kart <akramwasim1234-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi all, > I''ve installed paperclips but > paperclip is not saving the files > > my model has > > has_attached_file :attachment,:styles => { :medium => "300x300>", > :thumb => "100x100>" } > > > and i have db migration as > > class AddAttachmentToPolicies < ActiveRecord::Migration > def self.up > add_column :policies, :attachment_file_name, :string > add_column :policies, :attachment_content_type, :string > add_column :policies, :attachment_file_size, :integer > end > > def self.down > remove_column :policies, :attachment_file_name > remove_column :policies, :attachment_content_type > remove_column :policies, :attachment_file_size > end > > end > > > and I have that plugin as well > > but its not saving the files and I''m getting values as null in my DB > for the above set feilds > > Plz help me in this regard > > >-- Adam Jones Digirati Limited NZ adam-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org P 027 233 6933 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m using form_tag and i got errors as " /LOCALS~1/Temp/stream.3468.0 is not recognized by the ''identify'' command." when i hit submit On Sep 3, 3:20 pm, Adam Jones <a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org> wrote:> we probably need to see your controller code first > > > > On Thu, Sep 3, 2009 at 10:08 PM, Kart <akramwasim1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi all, > > I''ve installed paperclips but > > paperclip is not saving the files > > > my model has > > > has_attached_file :attachment,:styles => { :medium => "300x300>", > > :thumb => "100x100>" } > > > and i have db migration as > > > class AddAttachmentToPolicies < ActiveRecord::Migration > > def self.up > > add_column :policies, :attachment_file_name, :string > > add_column :policies, :attachment_content_type, :string > > add_column :policies, :attachment_file_size, :integer > > end > > > def self.down > > remove_column :policies, :attachment_file_name > > remove_column :policies, :attachment_content_type > > remove_column :policies, :attachment_file_size > > end > > > end > > > and I have that plugin as well > > > but its not saving the files and I''m getting values as null in my DB > > for the above set feilds > > > Plz help me in this regard > > -- > Adam Jones > Digirati Limited NZ > a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org > P 027 233 6933
Things to check: - your form_tag has :multipart set to true - imagemagick is installed and compiled properly - imagemagick is in the default load paths of your linux distro or specify the path explicitely - imagemagick has the necessary processor for the filetype you are uploading installed - the file you are uploading is effectively and at all times an image (if you want to upload non-thumbnailable files, you''ll need to handle that using a "before_post_process" method that determines what processor to use for what filetype On 03 Sep 2009, at 12:33, Kart wrote:> I''m using form_tag > and i got errors as " /LOCALS~1/Temp/stream.3468.0 is not recognized > by the ''identify'' command." > when i hit submit > > On Sep 3, 3:20 pm, Adam Jones <a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org> wrote: >> we probably need to see your controller code first >> >> On Thu, Sep 3, 2009 at 10:08 PM, Kart <akramwasim1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> wrote: >>> >>> I''ve installed paperclips but >>> paperclip is not saving the files >>> and I have that plugin as well >>> but its not saving the files and I''m getting values as null in my DB >>> for the above set feildsBest regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thankyou Peter , can you just tell me how to install imagemagick in windows On Sep 3, 4:00 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> Things to check: > > - your form_tag has :multipart set to true > - imagemagick is installed and compiled properly > - imagemagick is in the default load paths of your linux distro or > specify the path explicitely > - imagemagick has the necessary processor for the filetype you are > uploading installed > - the file you are uploading is effectively and at all times an image > (if you want to upload non-thumbnailable files, you''ll need to handle > that using a "before_post_process" method that determines what > processor to use for what filetype > > On 03 Sep 2009, at 12:33, Kart wrote: > > > > > I''m using form_tag > > and i got errors as " /LOCALS~1/Temp/stream.3468.0 is not recognized > > by the ''identify'' command." > > when i hit submit > > > On Sep 3, 3:20 pm, Adam Jones <a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org> wrote: > >> we probably need to see your controller code first > > >> On Thu, Sep 3, 2009 at 10:08 PM, Kart <akramwasim1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> wrote: > > >>> I''ve installed paperclips but > >>> paperclip is not saving the files > >>> and I have that plugin as well > >>> but its not saving the files and I''m getting values as null in my DB > >>> for the above set feilds > > Best regards > > Peter De Berdt
Not doing it very often, but here you go: http://lmgtfy.com/?q=install+imagemagick+windows http://lmgtfy.com/?q=paperclip+imagemagick+windows On 03 Sep 2009, at 14:01, Kart wrote:> thankyou Peter , > > can you just tell me how to install imagemagick in windows > > On Sep 3, 4:00 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote: >> Things to check: >> >> - your form_tag has :multipart set to true >> - imagemagick is installed and compiled properly >> - imagemagick is in the default load paths of your linux distro or >> specify the path explicitely >> - imagemagick has the necessary processor for the filetype you are >> uploading installed >> - the file you are uploading is effectively and at all times an image >> (if you want to upload non-thumbnailable files, you''ll need to handle >> that using a "before_post_process" method that determines what >> processor to use for what filetypeBest regards Peter De Berdt
Thanks, this thread was rather timely for me (just in before a deadline). I was facing exactly the same thing and had left off the multi-part bit in the form. Cheers, Jeremy On Sep 3, 11:00 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> Things to check: > > - your form_tag has :multipart set to true > - imagemagick is installed and compiled properly > - imagemagick is in the default load paths of your linux distro or > specify the path explicitely > - imagemagick has the necessary processor for the filetype you are > uploading installed > - the file you are uploading is effectively and at all times an image > (if you want to upload non-thumbnailable files, you''ll need to handle > that using a "before_post_process" method that determines what > processor to use for what filetype > > On 03 Sep 2009, at 12:33, Kart wrote: > > > > > I''m using form_tag > > and i got errors as " /LOCALS~1/Temp/stream.3468.0 is not recognized > > by the ''identify'' command." > > when i hit submit > > > On Sep 3, 3:20 pm, Adam Jones <a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org> wrote: > >> we probably need to see your controller code first > > >> On Thu, Sep 3, 2009 at 10:08 PM, Kart <akramwasim1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> wrote: > > >>> I''ve installed paperclips but > >>> paperclip is not saving the files > >>> and I have that plugin as well > >>> but its not saving the files and I''m getting values as null in my DB > >>> for the above set feilds > > Best regards > > Peter De Berdt
Kart wrote:> class AddAttachmentToPolicies < ActiveRecord::Migration > def self.up > add_column :policies, :attachment_file_name, :string > add_column :policies, :attachment_content_type, :string > add_column :policies, :attachment_file_size, :integer > endI also recommend including: add_column :policies, :attachment_updated_at, :datetime I don''t know that this is strictly required, but I found that I needed it when I was getting Paperclip working. I have since included it in several projects now. It wont hurt, and I think it may be required. (I remember that it is not documented.) -- Will
I''ve installed image magick............. but it still shows the error message "/LOCALS~1/Temp/stream.3468.0 is not recognized by the ''identify'' command.".Is that i need to install it in the project folder and give me some ways on how to compile it .or any other gems avilable for this paperclip to work. i''m in urgent need Plz help me in this regard... On Sep 4, 2:35 am, Will Merrell <w...-jkbzaOXREqcCMe7iY93BLQC/G2K4zDHf@public.gmane.org> wrote:> Kart wrote: > > class AddAttachmentToPolicies < ActiveRecord::Migration > > def self.up > > add_column :policies, :attachment_file_name, :string > > add_column :policies, :attachment_content_type, :string > > add_column :policies, :attachment_file_size, :integer > > end > > I also recommend including: > > add_column :policies, :attachment_updated_at, :datetime > > I don''t know that this is strictly required, but I found that I needed > it when I was gettingPaperclipworking. I have since included it in > several projects now. It wont hurt, and I think it may be required. (I > remember that it is not documented.) > > -- Will
Wasim Akram wrote:> I''ve installed image magick............. > but it still shows the error message "/LOCALS~1/Temp/stream.3468.0 is > not recognized > by the ''identify'' command.".Is that i need to install it in the > project folder and give me some ways on how to compile it .or any > other gems avilable for this paperclip to work. > i''m in urgent need > > > Plz help me in this regard...Use this: has_attached_file :image, :url => "/:attachment/:id_:style.:extension", :path => ":rails_root/public/:attachment/:id_:style.:extension", :styles => { :original => "500x500>" } Let me know how it goes. I have an working application that you can download from http://www.classifiedscript.in Cheers -- Posted via http://www.ruby-forum.com/.
I''m getting this error for windows setup does this solution work? Going Gray trying to figure out why I am getting the error. THanks for your help. On Sep 4, 3:40 am, Rails List <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Wasim Akram wrote: > > I''ve installed image magick............. > > but it still shows the error message "/LOCALS~1/Temp/stream.3468.0 is > >notrecognized > > by the ''identify''command.".Is that i need to install it in the > > project folder and give me some ways on how to compile it .or any > > other gems avilable for this paperclip to work. > > i''m in urgent need > > > Plz help me in this regard... > > Use this: > > has_attached_file :image, :url => "/:attachment/:id_:style.:extension", > :path => ":rails_root/public/:attachment/:id_:style.:extension", :styles > => { :original => "500x500>" } > > Let me know how it goes. I have an working application that you can > download fromhttp://www.classifiedscript.in > > Cheers > -- > Posted viahttp://www.ruby-forum.com/.
For windows, make sure you close down the rails server and any command prompt instances and restart them. The imagemagick install path in program files (the folder containing identify.exe) needs to be accessible in the PATH variable. To check type echo %PATH% in the command prompt. If the imagemagick installation folder shows, the rails app should function. On Oct 10, 7:33 pm, about2flip <mnu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m getting this error for windows setup does this solution work? > Going Gray trying to figure out why I am getting the error. > > THanks for your help. > > On Sep 4, 3:40 am, Rails List <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > > > Wasim Akram wrote: > > > I''ve installed image magick............. > > > but it still shows the error message "/LOCALS~1/Temp/stream.3468.0 is > > >notrecognized > > > by the ''identify''command.".Is that i need to install it in the > > > project folder and give me some ways on how to compile it .or any > > > other gems avilable for this paperclip to work. > > > i''m in urgent need > > > > Plz help me in this regard... > > > Use this: > > > has_attached_file :image, :url => "/:attachment/:id_:style.:extension", > > :path => ":rails_root/public/:attachment/:id_:style.:extension", :styles > > => { :original => "500x500>" } > > > Let me know how it goes. I have an working application that you can > > download fromhttp://www.classifiedscript.in > > > Cheers > > -- > > Posted viahttp://www.ruby-forum.com/.
check it in your system folder in your rails root app , where you can find your uploaded images Dhana On Mon, Oct 19, 2009 at 2:46 AM, petro_dev <bennybutler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > For windows, make sure you close down the rails server and any command > prompt instances and restart them. The imagemagick install path in > program files (the folder containing identify.exe) needs to be > accessible in the PATH variable. To check type echo %PATH% in the > command prompt. If the imagemagick installation folder shows, the > rails app should function. > > On Oct 10, 7:33 pm, about2flip <mnu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m getting this error for windows setup does this solution work? > > Going Gray trying to figure out why I am getting the error. > > > > THanks for your help. > > > > On Sep 4, 3:40 am, Rails List <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > > > > > > > Wasim Akram wrote: > > > > I''ve installed image magick............. > > > > but it still shows the error message "/LOCALS~1/Temp/stream.3468.0 is > > > >notrecognized > > > > by the ''identify''command.".Is that i need to install it in the > > > > project folder and give me some ways on how to compile it .or any > > > > other gems avilable for this paperclip to work. > > > > i''m in urgent need > > > > > > Plz help me in this regard... > > > > > Use this: > > > > > has_attached_file :image, :url => "/:attachment/:id_:style.:extension", > > > :path => ":rails_root/public/:attachment/:id_:style.:extension", > :styles > > > => { :original => "500x500>" } > > > > > Let me know how it goes. I have an working application that you can > > > download fromhttp://www.classifiedscript.in > > > > > Cheers > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---