Displaying 20 results from an estimated 10000 matches similar to: "Paperclip: Adding attachment to model on update not working"
2011 May 19
0
Unable to find the image path via file system using the paperclip plugin through the get method
Hello all,
with great difficulty , I guess I have finally been able to find the
appropriate git commit of paperclip which would suit my project''s config
which is Ruby 1.8.7 and rails 2.0.2.
I am trying to implement a POC before I integrate paperclip in my
project. The POC is basically implementing each post with an appropriate
image beside it. It seems to pretty much work, its just
2008 Nov 28
0
Paperclip Plugin - Routing Error?
Hi-
I am using the plugin "paperclip", this is my second time using it,
the first time, I had no
issues...
This time, I added paperclip onto my model, no issues until I tried to
render the images I uploaded. I see this in the development.log:
ActionController::RoutingError (No route matches "/avatars/2/original/
DSCN2149.JPG" with {:method=>:get}):
I didn''t
2011 Nov 20
1
Image preview paperclip
Hey guys,
I was trying to create a preview image using paperclip. Is it possible?
If yes, sb knows where can I find some post about it??
If no, What gem can I use to create preview images?
Bruno Meira
--
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
2009 Aug 07
2
paperclip model fails while when updating with no attachment
Hi all,
I have paperclip running in my rails environment. I setup a new model
just for paperclip called Assets so that I could upload multiple files
per item (even though I''m only using 1 attachment per item at the
moment). Everything works except for the following:
Updating an item record with no attachment in the form but having
PREVIOUSLY attached an asset while creating or updating.
2008 Sep 14
3
paperclip attachment destroy
Hi all
I''ve got a problem with the paperclip-plugin.
Is it posible that the attachment is not destroy if i call the
destroy-
method of a model?
Thank you for your help!
sigma
--~--~---------~--~----~------------~-------~--~----~
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
2011 Feb 23
0
Dynamically setting Paperclip processors with attachment instance data
I''m trying to dynamically set my Paperclip processors which are stored
in my database, ideally I would want to access
attachment.instance.paperclip_processor, but I can''t seem to do that.
Any ideas?
# class Post < ActiveRecord::Base
has_attached_file :image,
:path => ":rails_root/
public/:hash_path/:style/:basename.:extension",
:processors => lambda {
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
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:
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 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)
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
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 =>
2011 Aug 13
1
Paperclip - could not find generator.
Hello there,
I installed plugin "paperclip" for working with images, but after
running a command
--
rails generate paperclip user avatar
I am getting error
--
Could not find generator paperclip.
If I will try run a command
--
bundle show paperclip
So I will get
--
/Library/Ruby/Gems/1.8/gems/paperclip-2.3.0
In Gemfile I have
--
gem "paperclip", "~> 2.3"
I
2009 Aug 17
0
Paperclip: processor proc not firing
Hi
It''s extremely rare that I have to post something on the Rails list,
but this is one of those times that I''ve been completely stuck for
countless hours.
Environment: Rails 2.3.3
I''ve implemented a custom processor proc for video thumbnailing with
Paperclip (latest trunk version as git submodule, and yes, it''s
updated) using the instructions posted
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' }
2009 Sep 14
2
RMagick Installation woes
Hi,
I need to install Rmagick to get re-sizing working with Paperclip. My
dev machine is on Mac OSX Leopard and the server is on Ubuntu Intrepid
8.1
I dint have Macports or wget at first. I was following this article -
http://onrails.org/articles/2007/11/03/installing-rmagick-on-leopard-without-macports-or-fink.
Ive done this before too. But some dependency always failed.
I want to start with a
2010 Aug 22
0
Paperclip - possible to modify file and load file content as string?
Wanted to see if anyone knows of a way - or the preferred way - to do these
three tasks with Paperclip:
1) Access the content of an uploaded file before save. I did find that the
following works before save, but is there a clearer way to do this:
self.uploaded_file.queued_for_write[:original].open.read
2) Access the content of a file after save while my AR model instance is
still alive and/or
2012 Jan 25
0
Paperclip preserve files ?
Hi,
I am using paperclip to upload files. The problem I am facing is,
based on my object property I need to preserve my file. Means my object
should be deleted from db but the file need to be restored.
I am using the option :preserve_files => true.
If I keep the above option in model it will be access to all the
objects of the model. I need to restore only for limited objects.
2009 Oct 20
5
Annoying problem with file_field and paperclip
Hi all,
I have a really really annoying problem that''s driving me nuts with
file_field and paperclip and having to upload images everytime a form is
edited even though the user is quite happy with the currently uploaded
image or loose the previously uploaded image.
This seems to be caused by the rails file_field helper not storing the
data that has been read in from the db in the same
2011 Mar 08
0
keep getting an error, "rescue in load_missing_constant': uninitialized constant Paperclip::Glue (NameError)"
hi, there
rails: 2.3.8
machine os: Ubuntu 10.04 Lucid
I''m having some problems with my rails installation in one of my new
development machines.
I have installed all the gems in my config/environment.rb file.
When I now run either script/console or script/server, I have the
error of " `rescue in load_missing_constant'': uninitialized constant
Paperclip::Glue
2011 Feb 15
0
Question on Paperclip paths/urls
Note that if I use the default Paperclip :path (i.e. not setting this
attribute and files going to public/system), everything is fine. This
question is to do with setting an alternative path.
I have a model using paperclip for a file with a custom path:
has_attached_file :tu_raw_bill_csv,
:path =>