similar to: Paperclip images are not stored in my directory

Displaying 20 results from an estimated 400 matches similar to: "Paperclip images are not stored in my directory"

2010 Mar 17
3
Associating a default paperclip image from a different model
Here''s some code, this is my NewsItem model as you can see... class NewsItem < ActiveRecord::Base belongs_to :country has_attached_file :image, :styles => { :original => ''57x57'' }, :default_url => ''/images/football.png'' # has_attached_file :image, # :styles => { :original => ''57x57'' },
2010 Nov 18
0
max_allowed_packet mysql
Hi I am using rails 2.3.8 with mysql 5.1. In my attachment model the validation was validates_attachment_size :attachment, :less_than => 2.megabytes, :message => "Upload file size should not exceeds 2 MB" And my /etc/my.ini has max_allowed_packet = 16M The above worked perfectly. But now I need file limit size as 10 MB instead of 2 MB. So I changed validation
2008 Jun 09
10
Testing file attachment with Paperclip
Does someone have an example on faking a file upload for just ensuring it gets called, without actually uploading the file to s3. I thought that stubbing Model.has_attached_file would be enough, but it doesn''t seem so ... This is what I did: Video.stub!( :has_attached_file ).with( :name ).and_return( true ) has_attached_file is from paperclip, it gets mixed to the model. 1)
2014 Feb 18
0
How to Test Multimodel Paperclip attachments?
I'm using Rspec and FactoryGirl to create specs for multimodel paperclip attachments. From searching other questions, it seems like a single image attachment is more common. Car.rb class Car < ActiveRecord::Base has_many :uploads, dependent: :destroy validates :uploads, presence: { message: 'You must upload at least one image' }
2013 Oct 10
12
What's the best way to approach reading and parse large XLSX files?
Hello, I''m developing an app that basically, receives a 10MB or less XLSX files with +30000 rows or so, and another XLSX file with about 200rows, I have to read one row of the smallest file, look it up on the largest file and write data from both files to a new one. I just did a test reading a few rows from the largest file using ROO (Spreadsheet doesn''t support XSLX and
2010 Aug 08
2
paperclip save to disk and s3
I have a standard Paperclip setup that saves a file to my disk. In addition I would also like the file saved to my amazon s3 bucket. [code] after_save :copy_to_s3 def copy_to_s3 has_attached_file :photo, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :styles => { :thumb => "100x100#", :small => "750x750>"
2009 Sep 03
12
paperclip is not saving the files
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,
2010 Oct 29
8
Amazon s3 - paperclip - Rails3 - basic setup Noob simple problems
Hi all, I''ve got a feeling from other posts that this should be very simple, but believe me I''ve looked around many tutorials / blogs, but still cant even get the most basic setup working with paperclip and s3. I am however pretty new to Rails, so could be doing something dumb. ------- Firstly, to install and use paperclip and aws-s3 I''ve got them both in by Gemfile:
2009 Oct 08
2
Variable sizes with paperclip
How can i create variable sizes with paperclip. That the user can set the size he want and paperclip makes the picture. I only can create fixed sizes. -- Posted via http://www.ruby-forum.com/.
2011 Jan 03
2
Adding style to model (paperclip)
hello, I have a model (item) with one attachment (photo) and one style (small): class Producto < ActiveRecord::Base has_attached_file :photo, :styles => { :small => "50x50"}, end I would like to add a new style (:large), so I modify item.rb: class Producto < ActiveRecord::Base has_attached_file :photo, :styles => {{ :small => "50x50"},{ :large =>
2009 Jul 07
2
paperclip unit testing
Hi, Rails 2.3.2, paperclip 2.2.9.2 How can I unit test my model that has a paperclip attachment? I add to my model: --- CODE START --- has_attached_file :image, :default_url => '''' attr_protected :image_file_name, :image_content_type, :image_image_size --- CODE END --- Than I type a UNIT test: --- CODE START --- foo=FooModel.new({:image =>
2006 Apr 17
2
Error by POP3 login
Hello! After the success to get Dovecot finally running i have now another problem, but don't know what is wrong there, this is the message i got: pop3(contact at maddy.cc): Failed to create storage with data: /var/vmail/maddy.cc/contact/ What does it mean? Thanks for help! -- Marc-Andr? Appel 1, Caball d'en Boux F-66740 Villelongue dels Monts France +33.(0)6.86.82.41.31
2009 Aug 31
3
NameError: undefined local variable or method `testapp' for main:Object
Hi, I am new to Ruby on Rails. Recently, I downloaded and installed the InstantRails in the D:\ drive of my system. Now I wanted to try some small examples in ''irb'', so I created a file "testapp.rb" and in that pasted a code like this: ======================== class sample_class def sample_method puts "sample program" end
2010 Feb 15
4
Changing the :path and :url options of has_attached_file in paperclip
Hello, I am using the paperclip plugin to upload images and it works absolutely fine. I intend to save my uploaded images to C:\Application_name\public folder. Accordingly, with some study over the i-net, I changed the :path option of has_attached_file to - :path => "C:/Application_name/ public/:class/:attachment/:id/:style_:basename.:extension" Now, the files are being saved to
2010 Apr 01
2
paper clip plugin error
coming this error in my paper clilp plugin m getting this error * Photo C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ hrithik_roshan1,3756,1.jpg is not recognized by the ''identify'' command. * Photo C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ hrithik_roshan1,3756,1.jpg is not recognized by the ''identify'' command. * Photo C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/
2009 Nov 10
4
Model spec for file upload with paperclip and fastercsv
I just started my ImportsController and was this was really the way to go: ////////import.rb///////////////// class Import < ActiveRecord::Base has_attached_file :csv validates_attachment_presence :csv after_save :process_csv private def process_csv FasterCSV.foreach( csv.path) do |row| #TODO end end end /////////import_spec.rb///////////////// require
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT:
2008 Sep 02
4
Attachment_fu, Paperclip, & S3
For various reasons, I made a git branch and installed Paperclip in place of attachment_fu. Paperclip works great except that images seem to have lost some quality; edges have gone a little too jaggy to be able to drop attachment_fu just yet. After a post on the Paperclip Google Group, someone suggested the :convert_options could be passed additional attributes, like ''quality'',
2010 Feb 14
2
paperclip is making me crazy
seems pretty simple, my model... has_attached_file :pic_1, :styles => { :thumb => "120x90" }, :url => "/:attachment/:id_:style.:extension", :path => ":rails_root/public/system/:attachment/:id_:style.:extension" my view... <% form_tag(:action => ''create'', :html => { :multipart => true }) do -%> <label
2011 Mar 17
1
Paperclip validates_attachment_content_type not working?
Hi, I''m using the paperclip gem to upload photos. I''m trying to use the content-type validator in my photo-model but it''s not working. Photo upload with just the file-size validator works. What could this be? Here''s my code: http://pastebin.com/1nGfgmtN Thanks, Mathew -- You received this message because you are subscribed to the Google Groups "Ruby on