similar to: paperclip content_type error

Displaying 20 results from an estimated 10000 matches similar to: "paperclip content_type error"

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' }
2010 Feb 26
2
Routing Error using Paperclip
For some reason I can''t figure out why I am getting a routing error when I add Paperclip support. I have another test app when similar code is working. I created a new test app first without Paperclip support and it was doing the CRUD operation fine. However when I added Paperclip support I get the following error? Routing Error user_url failed to generate from
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'' },
2012 Aug 18
2
Paperclip images are not stored in my directory
It is my User.rb model, My images are not stored in my assets directory.. has_attached_file :photo, :styles => { :small => "100x100#", :large => "500x500>", :thumb => "60x60>" }, :url => "/assets/users/:id/:style/:basename.:extension", :path =>
2011 May 20
4
Unable to figure out why a photo attribute of the paperclip plugin is not being passed in as a param
Hello all, I am trying to implement a feature in my app where a user posts a message along with an image. This is something similar to what is there in `www.diasp.org` . I dealing with a pretty much outdated configuration of Rails 2.0.2 and Ruby 1.8.7 , both running on Ubuntu 10.04 OS for project specific purposes. Initially, I found a problem in finding an appropriate plugin for paperclip
2011 May 04
5
rails mongoid
I have a strange problem. Suppose I have a user model with only name field. I can add a field with value by creating an instance in mongodb rails environment. Example: class User include Mongoid::Document field :name end Now in rails console, If you do user = User.new user[:name] = "xxxx" user[:firstname] = "yyyy" user.save The record gets created with name and
2010 Aug 06
4
Paperclip not finding imagemagick on prod, works on dev
Hi, I am using paperclip to attach documents to my models. it works perfectly on my dev machine, but on the server I get a CommandNotFoundError. On my server if I ./script/console I can run imagemagick through system("convert") and it works, so why can''t paperclip find it? Thanks for your ideas PS: the paperclip google group isn''t getting much answers so I am
2010 Apr 03
0
Change from attachment_fu db BLOB to Paperclip S3
Hi: I have moved from using attachment_fu with files stored in the DB to Paperclip using S3. The trick now is to migrate the files from the DB to S3. I have tried a few methods like: SThreeFile.create(:file => AttachmentFuFile.first.data) and @attachment = AttachmentFuFile.first SThreeFile.create(:file => ActionController::Streaming.send_data @attachment.data, :filename =>
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
Hello, I have a problem with the paperclip, I put on my GemFile gem "paperclip", "~> 2.6.0" I create a migrate class FileUpload < ActiveRecord::Migration def up change_table :projects do |t| t.has_attached_file :image end end def down drop_attached_file :projects, :image end end on my model I put class Project < ActiveRecord::Base
2010 Jun 15
3
RoutingError
hi, can anyone help me. i want to create an url to invoke create action of a controller. routes.rb has the routes. But i am getting error at line 23. i have @user variable. user_contact_path(@user.id) I want generate url as : users/3/contacts to invoke contacts controller''s create action ---------------------------------------------------------------------------------
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 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/.
2009 Aug 16
0
Can't upload pictures using Paperclip due to weird error
I''m developing in Ubuntu, already have installed ImageScience and I''m getting this error everytime I try to upload a picture: [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/ stream20090816-10096-ddupoc-0 is not recognized by the ''identify'' command.> Can someone guide me on a solution? Thanks
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
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
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.
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 =>
2010 May 13
0
Rails 3, Paperclip and checking out particular revisions
Hey, got a weird one. I''ve been playing with a couple of Rails 3 apps and today I have broken both. Seemingly by updating my paperclip gem. Gemfile ..... gem ''paperclip'', :git => ''git://github.com/thoughtbot/paperclip.git'', :branch => ''rails3'' It appears the latest version of paperclip or at least in the branch has broken in