Every repository with this icon (
Every repository with this icon (
| Description: | Easy file attachment management for ActiveRecord edit |
-
Depend on shoulda instead of thoughtbot-shoulda
1 comment Created 27 days ago by dbackeusSince the gems have moved to gemcutter and gotten rid of the thoughtbot namespace this should be reflected in the gemspec dependencies as well.
Comments
-
Recently I wanted to have no processors so I can just pass thru file uploads using paperclip. I did not want the Thumbnail processor even being called because of the waste for even doing an identify, etc. So I made this Noop processor class.
Here is a patch I created in my own local branch that allows :processors to take a false option. I would appreciate a code review and would be willing to make any changes and/or submit a new patch if requested.
Comments
metaskills
Fri Nov 27 15:44:28 -0800 2009
| link
Seems this ticket is moot since the absence of :style options has the same effect. This can be closed.
metaskills
Fri Nov 27 15:44:40 -0800 2009
| link
Closing.
-
8 comments Created about 1 month ago by larsthegeekbugxThumbnailing causes NotIdentifiedByImageMagickError only with PDFsimagemagickxHi folks,
I have paperclip, imagemagic, and ghostscript all installed. My model has both photos and pdf attachments. Adding photos works splendidly, with two sizes of thumbnails being created without issue, so I know this is not a path issue with ImageMagick. (I have the command_path set in my initializers). I can add pdfs to the model as well, no issues. It all saves correctly.
However, if I try to generate thumbnails for the pdfs, I get an error:
[paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream20091104-51630-1i9owsz-0 is not recognized by the 'identify' command.>
When I run the 'identify' program manually on the tmp file it correctly identifies the pdf. I can also manually generate a thumbnail from the tmp file using 'convert'.
I'd love to be able to use paperclip for this rather than having to special-case pdfs.
Any thoughts on how to resolve this?
Cheers
Comments
thoughtbot
Thu Nov 05 07:36:33 -0800 2009
| link
I just recent pushed up a fix for identify not including the file extension. Can you pull that and try again? It may just be that ImageMagick doesn't know it's a PDF and is failing. Other than that, it could be that ghostscript isn't in your PATH, even if ImageMagick is. Unfortunately I don't have a fix for that except to make sure your gs binary is in the same directory as convert (even if it's just a symlink).
larsthegeek
Thu Nov 05 07:53:03 -0800 2009
| link
I pulled the most recent code. Still no joy. I verified 'convert', 'identify' and 'gs' are all in the same dir ( /opt/local/bin ) and that is the dir cited in my command_path initializer. The odd thing for me is the partial failure. Thumbnailing works for images, not for PDFs, when done through paperclip yet it does work command line.
Is there any other info I can provide?
Cheers,
James
thoughtbot
Thu Nov 05 08:04:54 -0800 2009
| link
Are you using Passenger? Working on the command line but not with Paperclip is usually a dead giveaway to PATH issues. If /opt/local/bin is not in the PATH for Passenger, then when ImageMagick farms out to gs it may not be able to find it.
According to http://blog.phusion.nl/2009/06/17/phusion-passenger-223-released-bug-fix-edition/ Passenger should be able to use SetEnv directives properly now, so if you could add /opt/local/bin to your PATH there it may work.
larsthegeek
Thu Nov 05 08:38:36 -0800 2009
| link
I'll certainly give it a shot, but if it were a path issue thumbnailing wouldn't work for images either, would it?
larsthegeek
Thu Nov 05 08:53:18 -0800 2009
| link
Bummer. No joy. I am using Passenger (2.2.5), tried setting the PATH variable in the passenger virtual host configuration. I also intentionally mis-set the command_path and path (via SetEnv) and image thumbnailing would fail on those cases. Perhaps it is something to do with how the filename of the pdf is being passed to identify?
thoughtbot
Thu Nov 05 09:13:54 -0800 2009
| link
No, that shouldn't make a difference. PDFs have a few magic bytes to start, so it should know. I assume it's a PATH issue because even though convert is found, convert (obviously) can't know about the :command_path. So if it tries to execute gs without it being in the PATH, it would fail. But it would be in the PATH on the command line. Can you paste the configuration that you used in your apache config and your paperclip initializer so I can take a look?
larsthegeek
Thu Nov 05 10:03:37 -0800 2009
| link
Ahh, found the issue!
I had to set DYLD_LIBRARY_PATH as well in my /etc/apache2/other/passenger.conf file.
/etc/apache2/other/passenger.conf
RailsEnv development
SetEnv DYLD_LIBRARY_PATH /opt/local/lib
SetEnv PATH /opt/local/bin/:$PATHNow all is well in PDF thumbnailing land.
Thanks for your help!
James
thoughtbot
Thu Nov 05 12:13:23 -0800 2009
| link
Great! Glad to hear it's working.
-
6 comments Created about 1 month ago by dustmooIssue with s3 storage and custom processor.processorsxHi all, for some reason, when I run my style through a custom processor, and the resulting file is being stored on s3, the s3 instance of the file shows up empty.(0b)
What is odd, is that if I store the file locally everything is fine. So the processor appears to be working correctly, just the S3Object.store to S3 appears to be passing an empty file.
Can anyone else confirm this?
Thanks!
Comments
thoughtbot
Thu Nov 05 07:38:49 -0800 2009
| link
What is your processor doing? It should be returning a File (usually a Tempfile). If you can verify that the file you're passing back has data in it, you should also confirm that the file has been rewound and is ready for reading.
I think thats the problem I am not rewinding the file. I am not sure why it is working locally without the rewinding. Let me fix the settings and check the result.
Yes this did. All I had to do is rewind the file before returning it for it to get sent properly.
In other words, my error. :)
Cheers!
-
2 comments Created about 1 month ago by mhawkinsfeaturexGenerate URLs for Private S3 ObjectspatchxI'd like to see the S3 storage module get a method to generate a URL for private S3 files. I'm working on a site that will be generating one time use URLs for customers to download with. I've seen several other people creating patches for this, so I think this could something useful to add to the core library.
AWS-S3 Docs for the S3Object#url_for method to generate a URL with a time expiring key.
http://amazon.rubyforge.org/doc/classes/AWS/S3/S3Object.html#M000045Comments
-
2 comments Created about 1 month ago by RodeoclashTempfile naming scheme causing identify command to failbugxIt seems that for identify to run correctly on some more obscure image formats it requires a file extension (for example, targa and .tga)
When paperclip first steams the upload into the tempfile it strips the extension giving the tempfile a name like: stream.301.0
For image formats like jpg/gif/png this won't cause any problems because it can parse the image format type without needing the extension, targa however requires .tga and this is causing the identify command to fail.
Comments
thoughtbot
Thu Nov 05 06:14:40 -0800 2009
| link
This has been fixed with c64223c
-
Hi there,
The Gem for the newest version does not appear to be available from Github. What turns up out of Rubyforge is an older version, 2.1.2, but 2.3.1.1 seems to be only available as a tarball. Which, obviously, I can download and build the gem, etc, but having the newest gem available on github (or RubyForge) is super convenient :-D
Cheers and thanks so much for the great plugin!
Billy GrayComments
-
ModelName.new.attachment_name.present? == true
2 comments Created about 1 month ago by camelpunchSee title!
Comments
This is normal, Paperclip does not work like attachment_fu. When you access the attachment, you always get a Paperclip::Attachment object (so .present? always evaluates to true) !
To test if the attachment has a file attached, use attachment_name.file?
camelpunch
Tue Nov 24 03:26:34 -0800 2009
| link
Thanks!
-
fix for Ruby 1.9
patch: (removed)
EDIT: wasn't using the most up-to-date version ...
Comments
-
Using RMagick instead of fork/exec ImageMagick
19 comments Created 3 months ago by andrenthHello
I have made a patch that makes use of RMagick instead of forking and running ImageMagick from the shell. This should be more efficient, especially on busy shared hosting servers, because it avoids the expensive fork and context switches.
The side effect is that the convert_options option can't be supported easily, although the comments hint that it shouldn't be used anyway.
The patch is at
http://github.com/andrenth/paperclip/commit/b3cc6a3d50dcd8a5a37f729da09326f8092df595
I'm not a rails programmer but I believe it is correct :) Could this be considered for inclusion, maybe enabled optionally by the user?
Thanks,
AndreComments
atinypixel
Wed Sep 09 14:03:55 -0700 2009
| link
I think the whole premise of paperclip is to skip RMagick and reference the ImageMagick library directly. Then again, I don't know how far along RMagick has come, so a lot could have changed since the last time I used the gem.
Any particular reason to avoid RMagick? Using the library seems much better in principle than relying on shell commands.
atinypixel
Wed Sep 09 16:36:49 -0700 2009
| link
Personally I don't think it really matters which approach you use. In RMagick you are essentially running the same commands. The only difference is the extra ruby library acting as the interface. Paperclip is leaner and faster simply because it trumps the extra library by accessing the ImageMagick library directly which also means you're not running extra processes needlessly.
It's not really the same thing, because RMagick doesn't need to spawn new processes in order to call the library functions (and therefore it's faster). On a busy server, avoiding forks is really important. Paperclip is not accessing the library directly, it's forking a shell which forks a process to run the ImageMagick executable. So it's actually two processes per call of Paperclip.run.
Do you think RMagick support could be added at least optionally, so that a user can choose the method he wants?
The last time we used RMagick it caused tons of memory and process issues in production, we've considered it best practice to not use RMagick for image resizing in production for several years now.
atinypixel
Wed Sep 09 18:09:24 -0700 2009
| link
I did some research and realize, andrenth, you are correct. Does anyone know if the developers of RMagick fixed the memory leaks? It's the only reason I (indirectly via attachment_fu) stopped using it.
I read a bit about the RMagick problem, and apparently it can be solved by calling the #destroy! method on the image to force memory to be freed (I didn't do that in my patch).
Reference: http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618
I closed the issue. As I stated, we don't see the need for this support or think its a good idea. Additionally, your changes don't come with any test changes. Thanks, maybe you can consider working on it more, adding tests, and then reporting back with your successes or failures and we can reconsider it.
Well, I didn't include tests because the only method whose interface was changed was "cropping" in geometry.rb, for which there is no test anyway. I could try running the tests though... Apart from installing the required gems, is there anything I need to do other than running "rake test"?
using RMagick is a bad idea. by issuing a system call it's super easy to background the task or even queue it for later execution. using the api makes this impossible to do easily in ruby. you could fork and exec the RMagick command but that would be you back at square one. the only portable and simple way to ever hope to manage background cropping is to build and defer shell commands which could be queued. this is the real solution to making crops faster (to the client) on a busy server.
I strongly disagree. Calling shell commands is both inefficient and fragile (what if ImageMagick decides to print its output slighly differently in a future version? This could break paperclip's parsing). As you said, using RMagick gives you both options, because you can fork/exec if you really want to, although if background cropping really is the issue, one could use backgroundrb to get it done.
well, as someone who has written more process management that anyone i know of in ruby, including the code that (used to) be used for background process on github, the gems open4, spawn, systemu, rq, slave, bj, and as a contributor to backgrounddrb i assure you that is not true. the only portable way to manage, log, and scale background processing in ruby is via system commands and/or processes. even the background systems like bj use the strategy of issuing a fork before running code to give a clean memory space that can be swept away after the code has ran to prevent memory leaks. i'll be impressed if you can build a background system that runs arbitrary code, is portable (don't forget windows), easy to install and mange in production, and doesn't leak memory like a sieve. also, i think it's misguided to alter production code to handle the special case of a shared server - no one should be running a production rails app on a box that is pushing the ulimit of fork - which is both super cheap and super fast since many years ago.
you are also probably aware that the image magick code itself uses multiple threads to do processing in a standard config which, under linux, are virtually identical (LWP) to forking/execing processes, especially wrst to limits on a shared server. aka - using the API isn't going to avoid ulimits on shared servers anyways.
Thanks for the backup on this, ahoward. You said it better than I could have.
I know the code you wrote Ara. I am a user of open4, and I'm thankful for it. I even reported a descriptor leak in it once.
I don't really wish to discuss background systems here because that's not the point. All you said doesn't change the fact that 1) calling library code is faster than forking a shell and 2) relying on stdout parsing is very fragile. If there's no other way to background a task reliably, then do it like that, fork the shell... my request is simply to let the user have a choice regarding the invocation of ImageMagick. That way, even if the ImageMagick tools aren't provided, or if forking is limited somehow on the server, being able to use Paperclip would be just a matter of a "gem install".
I don't really think it's fair to declare how one should or should not run their apps. Different situations have different constraints, and letting people use Paperclip when one of these constraints is the unavailability of command line tools would be very nice of the developers. Even if the user must be warned that backgrounding won't work or whatever (if that is even going to be implemented some day), I don't see how giving the user an option is a bad thing.
Thanks.
Its a bad thing because it will create support and maintenance headaches for paperclip maintainers both in dealing with the support trouble this will cause and the additional maintenance overhead of the extra code and functionality that none of us (maintainers) would use.
One of the reasons why paperclip is good is because it tries to be dead simple with what it does and have certain opinions about the proper way to do things, and to be based around real world scenarios and best practices not what someone, somewhere might want.
So because I have different requirements, that means my use case is a bad practice and not a real world scenario... I find that hard to understand. After Rails became successful, everyone likes to repeat DHH and say their software is "opinionated" as if that justified every design decision, especially the bad ones. All they're doing is harming their own user base, though.
If you really believe your solution is right for you, you can use your fork that does what you want. If, in the future, the needs of the majority of paperclip users change, or your solution proves itself to be better, than it'd certainly be revisited for paperclip master.
atinypixel
Thu Sep 10 10:21:02 -0700 2009
| link
None of these things matter to a user base. I really don't think there is a wrong answer here. Each approach has it's merits and their downfalls and there really is no point in discussing which way is the "right" way since every project has varying requirements.
If you're unhappy with paperclip, use attachment_fu and vice versa. Each bring their own benefits to the table, it's really up to the developer which of those benefits are better for your project.
As far as which approach is faster? I don't think it really matters and this is especially true considering probably none of you are running projects where millions of users are resizing images on a daily basis (although I could be wrong).
Since I'm a designer, I'd take all those thoughts for a grain of salt. :)
-
Right now the project includes specific version of mocha gem variation (jferris) found only in GitHub.
Not only that, stuck to 0.9.5.something version, while the latest one available is 0.9.7.20090701124354 (btw, not easy to remember)
Development documentation should indicate it
Comments
-
Attachment.url is braking because of appended timestamps
2 comments Created 3 months ago by iainbeestonThe default behaviour of Attachment.url has been changed to include a timestamp on the end of the filename, but the code for doing this is breaking for some of us. Please see http://groups.google.com/group/paperclip-plugin/browse_thread/thread/87c9d8f01d8a11df
I've been able to fix this locally by changing the default parameters for url() to not include this timestamp, but I imagine that whoever wrote in this change would like to see it working properly rather than just disabled.
Thanks
Comments
thoughtbot
Thu Sep 03 09:30:51 -0700 2009
| link
I've come up with a solution for this which should work in all cases, including when updated_at is a DateTime. It's on master now.
iainbeeston
Tue Sep 08 22:40:11 -0700 2009
| link
Just want to confirm that this works for me. Thanks!
-
1 comment Created 3 months ago by kingpongbugxS3 protocol incorrect when "public-read" is specifieddocsxHi folks. According to the documentation, :s3_protocol "Defaults to ‘http’ when your :s3_permissions are ‘public-read’ (the default)". It actually doesn't, though -- it checks against :public_read, not "public-read".
I'm using gem version 2.3.1.
Comments
thoughtbot
Thu Sep 03 10:22:26 -0700 2009
| link
You're right. The correct thing to use is :public_read, as that's what AWS::S3 uses. I've fixed the docs in master.
-
Hi, I have code
in view
<% uberform_for :profile, :html => { :multipart => true, :method
=> :put }, :url => update_avatar_path do |f| %> <%= f.file_field :avatar %><%= f.submit 'Upload avatar' %>
<% end %>in controller
def update_avatar
current_user.profile.update_attribute(:avatar, params[:avatar]) redirect_to user_path(current_user)end
and in model
class Profile < ActiveRecord::Base
attr_accessible :first_name, :last_name, :nickname has_attached_file :avatar, :styles => {:thumb => '100x100>'},:path => '#{RAILS_ROOT}/public/images/avatars/:id/:normalized_basename_:style.:extension',
:url => '/images/avatars/:id/:normalized_basename_:style.:extension'
validates_attachment_content_type :avatar, :content_type => ['image/ jpeg', 'image/png', 'image/gif']
validates_attachment_size :avatar, :less_than => 1.megabytes endAnd when i'm trying to upload avatar - nothing arrives to db and to
the filesystem. In Logs i seeProcessing UsersController#update_avatar (for 127.0.0.1 at 2009-08-26
11:09:04) [PUT]
Parameters: {"profile"=>{"avatar"=>#<File:/var/folders/zg/ zghNxzjrFP02se1nq1fKQ++++TI/-Tmp-/
RackMultipart20090826-3425-1akehpx-0>},
"authenticity_token"=>"Frf1ozk01ePIhvsPSX3k1ophgvHHrnBFKhFcF21co+o="} User Load (0.5ms) SELECT FROM "users" WHERE ("users"."id" = 1) LIMIT 1
Profile Load (0.4ms) SELECT FROM "profiles" WHERE ("profiles".user_id = 1) LIMIT 1 [paperclip] Saving attachments. Redirected to http://localhost:3000/users/alec-c4
Completed in 18ms (DB: 1) | 302 Found [http://localhost/update_avatar]and application renders picture /avatars/thumb/missing.png
How to solve it? Thanks!
Comments
on attempt to set avatar from console
p= Profile.find 1 => # p.avatar = File.open('/Users/alec/Documents/Personal Data/avatars/11412573.jpg') ArgumentError: wrong number of arguments (2 for 1)
from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/thumbnail.rb:5:in `[]' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/thumbnail.rb:5:in `initialize' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/thumbnail.rb:19:in `new' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/thumbnail.rb:19:in `make' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/attachment.rb:17:in `post_process' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/attachment.rb:13:in `each' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip-extended/lib/commands/attachment.rb:13:in `post_process' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip/lib/paperclip/attachment.rb:87:in `assign' from /Users/alec/Documents/Projects/Workspaces/my projects/cyberberry_id/vendor/plugins/paperclip/lib/paperclip.rb:232:in `avatar=' from (irb):35there are conflict with paperclip-extended, i think issue can be closed
thoughtbot
Thu Sep 03 10:41:24 -0700 2009
| link
Ok, I'll close this. If it turns out this is related to paperclip specifically, please open another ticket.
-
Uploading more than 32000 images causes failure on ext3
2 comments Created 3 months ago by mavientTurns out that ext3 can only handle 32000 sub directories in a given directory. http://www.wlug.org.nz/EMLINK.
>Backtrace:
/usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': Too many links from /applications/diveexplorer/vendor/gems/thoughtbot-paperclip-2.3.1/lib/paperclip/storage.rb:40:in `flush_writes' from /applications/diveexplorer/vendor/gems/thoughtbot-paperclip-2.3.1/lib/paperclip/storage.rb:38:in `each'I am going to see if I can work up a patch to resolve the issue.
Comments
thoughtbot
Thu Sep 03 10:45:06 -0700 2009
| link
Ok, I'll close this, then.
-
The case syntax looks wrong for 1.9...
% rake
(in /Users/mwotton/projects/rev) rake aborted!
/opt/local/lib/ruby/gems/1.9.1/gems/paperclip-2.1.2/lib/paperclip/storage.rb:118: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' /opt/local/lib/ruby/gems/1.9.1/gems/paperclip-2.1.2/lib/paperclip/storage.rb:120: syntax error, unexpected keyword_when, expecting keyword_endwhen String: ^/opt/local/lib/ruby/gems/1.9.1/gems/paperclip-2.1.2/lib/paperclip/storage.rb:122: syntax error, unexpected keyword_when, expecting keyword_end
when Hash: ^/opt/local/lib/ruby/gems/1.9.1/gems/paperclip-2.1.2/lib/paperclip/storage.rb:132: syntax error, unexpected keyword_end, expecting $end
(See full trace by running task with --trace)
Comments
thoughtbot
Thu Sep 03 11:01:28 -0700 2009
| link
You are running paperclip 2.1.2. The latest version is 2.3.1. Only 2.3.0 and up have been tested with Ruby 1.9.1. Please upgrade, and if you have further problems please create another ticket. Thanks.
-
2 comments Created 4 months ago by simmerzTemp files not referenced on failed validation so user must upload all attachments againfeaturexThis is especially the case for a form where the user can upload multiple attachments. Upload Column allows this, and references the location of the temp file. This allows a hidden field to be added to the response form with the location data for the temp file. When the form is then submitted with valid data, the file is retrieved and placed in the right place.
Comments
Actually, this is the same as http://github.com/thoughtbot/paperclip/issues/#issue/72
thoughtbot
Thu Sep 03 12:03:49 -0700 2009
| link
Seems so. I'll close this ticket.
-
societies infrared achat kamagra oral achat levitra achat viagra montreal acheter cialis generique acheter kamagra acheter kamagra jelly acheter levitra
Comments
-
Weird configuration in using CNAMEs for S3 URLs
2 comments Created 4 months ago by nirvdrumI did something like the following:
:url => :s3_alias_url, :s3_host_alias => 'my-cname.example.com'
But, Paperclip was still using the S3 path URLs. I was able to get it to use the CNAME by changing the config to {:url => ":s3_alias_url" }. It looks like there is something funky going on in the symbol to string coercion.
7af82d257bc7a7919e82b4eaf8ac appears to have caused the immediate problem by reintroducing the prepended colon to the string.
Comments
This isn't actually a bug. ":s3_alias_url" is an interpolation into a string, not a symbol. I just looks like one. It's the same as ":style" and ":class", which are also interpolations.
-
Multiple uploads and paperclip fail with Rails 2.3.3
4 comments Created 4 months ago by webandyHello. I have put together a sample app that uses Uploadify (Flash+JS) to make multiple POST requests to an assets controller. The app is very simplistic to demonstrate the problem. The app attempts to create one Asset record per POST request.
The good news is that by using Rails 2.3.2 multiple uploads with Paperclip work great. However when upping the gem version of rails in environment.rb to 2.3.3, an error is encountered that stops execution.
http://github.com/webandy/uploadifytest/tree/master
Paperclip installed as a gem version 2.3.0
I'm hoping a committer to Paperclip can reproduce the issue between Rails 2.3.2 and 2.3.3 and resolve it with help from this sample app. For our needs we can stick with Rails 2.3.2 for the time being but will definitely upgrade down the road. Thanks.
Comments
I don't think your problem is with paperclip. Your app is not queueing the uploads which is causing a major bottleneck when two images are the same size or get to the server at the same time. I uploaded 3 different images of different sizes at the same time with no problems using rails 2.3.3. If you look at the way swfupload queue works (look at my sample app), it only uploads one picture at a time... Basically your sending multiple requests at the same time with the same session info which is causing problems. I would suggest queueing the items for upload. No guess as to why it worked for you in 2.3.2, it's hit and miss for me but does work occasionally in 2.3.3.
I'm afraid I'm unable to reproduce. The files appear to be uploading fine for me.
OK, I accept the queueing thing might be it. I was uploading 2 or more of the flags files on OSX for the different languages. they are very small GIFs and of note: they are the same size. The best practice with a Flash uploader is probably to queue uploads. Most of the time most people are uploading files of different sizes in which case the problem is less (or not) visible. Thanks for checking it out!
thoughtbot
Thu Sep 03 12:05:28 -0700 2009
| link
Since this is not reproducible, I'm going to close this. If you find a more specific cause, feel free to open another ticket.
-
Paperclip has some kind of object with a 'class' method that doesn't match the standard Object.class signature. It's defined in lib/paperclip/interpolations.rb line 66 (in v2.3.0). The fiveruns-dash-rails gem loops through ObjectSpace.each_object checking classes as part of its initialization. If the Paperclip object with the odd signature is loaded, Rails fails to load with the error:
[gem path]/fiveruns-dash-rails-0.8.6/lib/fiveruns/dash/recipes/rails.rb:100:in `class': wrong number of arguments (0 for 2) (ArgumentError)
I'd suggest altering the class method to match Object.class's signature by making params optional, but I'm not familiar with what Paperclip is doing there or why, so I don't want to just offer a blind patch.
(There is a workaround: in config/environments.rb, load the fiveruns-dash-rails gem before thoughtbot-paperclip.)
Comments
I've cross-reported this to FiveRuns at http://support.fiveruns.com/discussions/problems/395-incompatible-with-paperclip-gem
I've just pushed up 2.3.1, which fixed this problem. Calling #class should act like expected. Thanks.
-
2 comments Created 4 months ago by dbackeusAttachment is lost if any validations failfeaturexTo quote an old comment on a blog I found mentioning this problem:
"For instance we’ve the model Medium which has_attachment :file and validates_presence_of :comment. If we left out the comment but specified a :file (let’s say a big one… 200MB…) the validation will fail and the data is lost. It’s pretty annoying if you have to upload the file again."
Since the normal behaviour of an AR object is to keep the given attributes after re-rendering the form view after a failed validation it can come as quite the surprise to users that they will have to re-upload files like this.
Comments
This is especially the case for a form where the user can upload multiple attachments. Upload Column allows this, and references the location of the temp file. This allows a hidden field to be added to the response form with the location data for the temp file. When the form is then submitted with valid data, the file is retrieved and placed in the right place.
Yes, this is the normal behavior of AR, but it's not the normal behavior of file uploads in general. Specficially, in order for this to happen, we would need special file_field helpers to display the file if it exists in the "temp" area. Also, this might not even be possible on environments like Heroku that do not allow filesystem access. I do eventually want to add functionality like this, but I will not be doing so for a while. I will gladly review and consider patches that allow this functionality, however.
-
Comments
-
Hi,
Today I switched from paperclip 2.1.2 to 2.3.0 and it took me about 3 hours to get it working. On both my Mac and my Ubuntu server I got an error concerning Rack and the Temp file. First I thought it was the known issue with the empty file field in a multipart form. But after digging deeper into it, I found I had to define the command_path in the environment files. After adding Paperclip.options[:command_path] = "/opt/local/bin" everything worked again. This only seems to happen with Passenger, not inWebrick or Mongrel. My setup is:
Rails 2.3.3
Passenger 2.2.4
Paperclip 2.3.0 (as plugin)I found the solution, but I was getting quite frustrated about things not working and Paperclip not giving me anything. Maybe a thing to smooth out?
Comments
luislavena
Sat Aug 01 16:57:20 -0700 2009
| link
Is not Paperclip fault but Passenger.
Passenger runs in a less permissive user account and do not share the same PATH than your normal user when running Webrick or Mongrel.
There are two options: one indicate this using SetEnv in Apache vhost configuration or setup Paperclip to define the command_path.
I work around that with this config/paperclip.yml in my projects:
luislavena
Sat Aug 01 16:59:01 -0700 2009
| link
Added "initializer" to read better :-)
Thanx, great workaround indeed!
I'm going to implement it right away.Maybe a good thing to mention this in the Readme?
Just an extra line for Passenger users...Well I think the real issue is the cryptic error message you get from Paperclip. I have submitted a patch (as part of Issue #69) to bubble up a more accurate error message when the executables cannot be found on the PATH. I think it would have saved you quite a bit of time...
I agree!
The error message could have been more descriptive.
thoughtbot
Thu Sep 03 12:04:39 -0700 2009
| link
Seeing as this is a Passenger issue and the better error message is handled elsewhere I'm going to close this.
-
royal weathering reliable 2004 buy ambien buy adipex buy ativan buy clonazepam without prescription buy meridia buy propecia
Comments
-
reducing late cycles environmental differing oscillation
Comments
Viagra pharmacy viagra 91686 [URL=http://forum.civicrm.org/index.php?action=profile;u=7613]viagra[/URL] ;) http://forum.civicrm.org/index.php?action=profile;u=7613 fdlyxh
-
comment lapse permafrost circulation environmental depend
Comments
Sorry, should mention that I am able to get the app running when I load the server with script/server mongrel, but not through passenger/apache. :) There are no errors when I use mongrel.
Hi all,
Well, Finally solved my issue- thought i'd share the solution incase it comes up again.
The apache error log showed me that it wasn't saving the file properly, and was being cached by passenger. A simple update to passenger and restart of apache fixed this.Thanks,
Mitch -
4 comments Created 6 months ago by praveensharmaPaperclip / Right_AWS & Content_Type IssuebugxHey there. I'm having a weird issue when trying to rake refresh paperclip after initally setting it up to use s3 storage. The following is the error:
undefined method `content_type' for # /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:57 /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:26:in `for_all_attachments' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `each' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `for_all_attachments' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `each' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:
Could anyone lend a hand? I've upgraded Ruby to 1.8.7, Updated all Gems / Plugins, Tried using AWS/S3 gem instead of Right_AWS (doesn't work). I'm attempting to upload images and mp3s. Though the issue occurs even when I turn off the mp3 uploading...
Comments
praveensharma
Mon Jun 22 10:57:25 -0700 2009
| link
SOLVED! I had to update my copy of paperclip to the http://github.com/timcowlishaw/paperclip/commit/58520abdfb901e93bd508148b327e9e6dd40e237 version!
praveensharma
Tue Jun 23 14:04:36 -0700 2009
| link
NOT SOLVED! It appears that when I updated my copy of paperclip to that branch, it breaks S3 uploads in a different way (ImageMagick 'identify' not found) - I believe that this is due to the changes in to_file.
Anyway - i'm still getting this error using the main branch of paperclip:
** Invoke paperclip:refresh (first_time) ** Invoke paperclip:refresh:metadata (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute paperclip:refresh:metadata rake aborted! undefined method `content_type' for # /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:57 /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:26:in `for_all_attachments' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `each' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `for_all_attachments' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `each' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `for_all_attachments' /Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:54 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19
I haven't seen this before...also, you're better off asking general questions on the mailing list or at least searching through it to see if anyone else has run into this.
http://groups.google.com/group/paperclip-plugin
Also, I wrapped your errors in a pre tag so GitHub wouldn't muck it up.
praveensharma
Thu Jun 25 11:29:41 -0700 2009
| link
Thanks for the link to the google group! Closing this issue as I've posted a possible solution in another thread.
-
Paperclip fails silently, unable to insert any data into database.
2 comments Created 6 months ago by mansuI am writing a web service that will allow users to upload files into the system. I have performed the steps as suggested in the tutorial. However, when I submit the form(new) I don't see anything inserted into the database. The server console doesn't show any error messages either. I also have imagemagick and rmagick gem installed. I am running the latest version of rails on ubuntu jaunty. My code is included below:
Below is the description of my table:
mysql> desc videos; +------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | vid_file_name | varchar(255) | YES | | NULL | | | vid_content_type | varchar(255) | YES | | NULL | | | vid_file_size | int(11) | YES | | NULL | | | cameraid | int(11) | YES | | NULL | | | video_from | datetime | YES | | NULL | | | video_to | datetime | YES | | NULL | | | numframes | int(11) | YES | | NULL | | | fps | int(11) | YES | | NULL | | | hres | int(11) | YES | | NULL | | | vres | int(11) | YES | | NULL | | | vid_calib_info | text | YES | | NULL | | | obj_ids | text | YES | | NULL | | | misc | text | YES | | NULL | | | notes | text | YES | | NULL | | | created_by | varchar(255) | YES | | NULL | | | location | varchar(255) | YES | | NULL | | | created_at | datetime | YES | | NULL | | | updated_at | datetime | YES | | NULL | | +------------------+--------------+------+-----+---------+----------------+My Model and Controller are as follows:
class Video < ActiveRecord::Base #validates_attachment_presence :vid has_attached_file :vid, :styles => {:thumb => "100x100#"} end # GET /videos/new # GET /videos/new.xml def new @video = Video.new RAILS_DEFAULT_LOGGER.debug "creating new object" respond_to do |format| format.html # new.html.erb format.xml { render :xml => @video } end end # GET /videos/1/edit def edit @video = Video.find(params[:id]) end # POST /videos # POST /videos.xml def create RAILS_DEFAULT_LOGGER "before object" @video = Video.new(params[:video]) RAILS_DEFAULT_LOGGER "created object" respond_to do |format| if @video.save flash[:notice] = 'Video was successfully created.' format.html { redirect_to(@video) } format.xml { render :xml => @video, :status => :created, :location => @video } else format.html { RAILS_DEFAULT_LOGGER "error creating object" + @video.errors render :action => "new" } format.xml { render :xml => @video.errors, :status => :unprocessable_entity } end end endThe following lines in the form have been changed:
<% form_for :video, :html => {:multipart => true} do |f| %> <%= f.error_messages %> <p> <%= f.label :vid_file_name %><br /> <%= f.file_field :vid %> </p>When I upload a fill the form with a new file, I see the following on the server console:
Processing VideosController#new (for 127.0.0.1 at 2009-06-09 23:32:56) [POST] Parameters: {"commit"=>"Create", "authenticity_token"=>"1183HJ8CLm9WV88iomd42PrwqSYSdzwCWwTN9JU5BNM=", "video"=>{"video_to(2i)"=>"6", "location"=>"", "misc"=>"", "vres"=>"", "video_to(3i)"=>"10", "hres"=>"", "video_to(4i)"=>"03", "cameraid"=>"", "notes"=>"", "numframes"=>"", "video_to(5i)"=>"30", "video_from(1i)"=>"2009", "video_from(2i)"=>"6", "vid_file_size"=>"", "created_by"=>"", "video_from(3i)"=>"10", "vid_content_type"=>"", "video_from(4i)"=>"03", "vid"=>#<File:/tmp/RackMultipart20090609-25055-oists5-0>, "video_from(5i)"=>"30", "obj_ids"=>"", "vid_calib_info"=>"", "fps"=>"", "video_to(1i)"=>"2009"}} Video Columns (1.5ms) SHOW FIELDS FROM `videos`Any pointers as to what I am doing incorrectly?
Comments
I figured out the solution. I was submitting it to the wrong action. The HTML form should be:
<% form_for :video, @video, :url => { :action => "create" }, :html => {:multipart => true} do |f| %> <%= f.error_messages %><%= f.label :vid_file_name %><br /> <%= f.file_field :vid %> -
rake paperclip:refresh class name error for nested model
1 comment Created 6 months ago by bkpavanRake task for nested ActiveRecord model eg. Namespace1::ModelName fails.
Error log:
/paperclip/tasks/paperclip_tasks.rake:5:inconst_get' /paperclip/tasks/paperclip_tasks.rake:5:inobtain_class' /paperclip/tasks/paperclip_tasks.rake:19:in `for_all_attachments' /paperclip/tasks/paperclip_tasks.rake:55Comments
-
Removed
Comments
-
1 comment Created 6 months ago by tristandunnfeaturexpollution ces level efficiencypatchxopen allows permafrost emission part
Comments
tristandunn
Thu Jul 09 16:24:58 -0700 2009
| link
Not sure what happened here... Closing.
-
emission wire below generic viagra hydrocodone online kamagra
Comments
arg! i think my account got hacked. Just changed my password. sorry.
Your account wasn't hacked, there was an auth bug in Issues. It's been fixed though.
-
undefined method `exitstatus' for nil:NilClass
4 comments Created 7 months ago by jonmagicPaperclip 2.2.8 works fine with my app on linux (Ubuntu 8.0.4) but when I try to run my app on Windows (that has ImageMagick 6.5.2 Q16) Paperclip tanks. Initially it was giving me the error this guy was getting, http://bit.ly/14PPyS, but after applying his fix I started getting a new error.
undefined method `exitstatus' for nil:NilClass
I ran "rake test" inside the gem dir on linux and windows, and on windows it had 3 errors and 1 failure.
1) Error:
A multipage PDF being thumbnailed at 100x100 with cropping should create the thumbnail when sent #make. Paperclip::NotIdentifiedByImageMagickError: ./test/fixtures/twopage.pdf is not recognized by the `identify' command.2) Error:
A multipage PDF being thumbnailed at 100x100 with cropping should report its current and target geometries. Paperclip::NotIdentifiedByImageMagickError: ./test/fixtures/twopage.pdf is not recognized by the `identify' command.3) Error:
A multipage PDF being thumbnailed at 100x100 with cropping should report its correct format. Paperclip::NotIdentifiedByImageMagickError: ./test/fixtures/twopage.pdf is not recognized by the `identify' command.4) Failure:
A multipage PDF should start with two pages with dimensions 612x792.
("612x792612x792") expected but was ("")Tests pass fine on osx and ubuntu.
Comments
Do you have ghostscript installed? It looks as though you don't have any other identify errors except for PDF ones. I don't know about that Failure though. I'll look into that.
Ok, installed ghostscript and ran the tests and sure enough they passed. But whats really weird is that now jpeg/png/gif resizing works too from my rails app. What would gs have to do with images (not pdf's)?
Nothing that I know of, but maybe it was just a missing piece that ImageMagick didn't expect to be missing. Glad to hear it's working.
-
I tried to upgrade from paperclip 2.1.2 to 2.2.8, and got this error:
FloatDomainError (NaN):
c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/geometry.rb:109:in `%' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/geometry.rb:109:in `cropping' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/geometry.rb:89:in `transformation_to' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/thumbnail.rb:63:in `transformation_command' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/thumbnail.rb:47:in `make' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/processor.rb:32:in `make' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:366:in `post_process_styles' /vendor/rails/activerecord/lib/active_record/attribute_methods.rb:213:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:365:in `each' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:365:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:365:in `post_process_styles' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:362:in `each' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:362:in `post_process_styles' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:348:in `post_process' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip/attachment.rb:89:in `assign' c:/ruby/lib/ruby/gems/1.8/gems/thoughtbot-paperclip-2.2.8/lib/paperclip.rb:204:in `photo=' /vendor/rails/activerecord/lib/active_record/base.rb:2462:in `send' /vendor/rails/activerecord/lib/active_record/base.rb:2462:in `update_attribute' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:214:in `send' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:214:in `method_missing' /app/controllers/profiles_controller.rb:73:in `pic' /vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `run_before_filters' /app/controllers/application.rb:26:in `call' /app/controllers/application.rb:26 /vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call' /vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method' /vendor/rails/actionpack/lib/action_controller/filters.rb:184:in `call' /vendor/rails/actionpack/lib/action_controller/filters.rb:635:in `run_before_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:615:in `call_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue_without_instrument_41569710' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue_without_instrument_41569710' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:125:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching' /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_without_instrument_41580570' /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache' /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_without_instrument_41580570' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:121:in `perform_action_without_instrument_41577620' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:65:in `timing' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:120:in `perform_action_without_instrument_41577620' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:121:in `perform_action_without_fiveruns_dash_context' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:65:in `timing' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-ruby-0.8.8/lib/fiveruns/dash/instrument.rb:120:in `perform_action_without_fiveruns_dash_context' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-rails-0.7.8/lib/fiveruns/dash/rails.rb:194:in `perform_action_without_dash_startup' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-rails-0.7.8/lib/fiveruns/dash/recipes/rails.rb:113:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process' /vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process_without_fiveruns_dash_tracing' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-rails-0.7.8/lib/fiveruns/dash/rails.rb:172:in `process' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-rails-0.7.8/lib/fiveruns/dash/rails.rb:183:in `call' c:/ruby/lib/ruby/gems/1.8/gems/fiveruns-dash-rails-0.7.8/lib/fiveruns/dash/rails.rb:183:in `process' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:76:in `process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281 /vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' /vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' /vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' /vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' /vendor/rails/railties/lib/commands/servers/mongrel.rb:64 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' /vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' /vendor/rails/railties/lib/commands/server.rb:49 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3Comments
Received in a GitHub message from ghazel:
has_attached_file :photo, :styles => { :large => "180x180#", :medium_square => "124x124#", :small => "60x60#", :thumb => "50x50#" }, :default_url => "/images/default_:style_photo.png"
132x144 png I am able to upload fine with the previous version.
hi all, I got the exact same issue when I tried to upload animated gifs. The explanation as well as the solution are described here: http://groups.google.com/group/paperclip-plugin/browse_thread/thread/042527c0e5580ac0
To make short, the format used to get the image dimensions is not accurate for some kind of images.
- bug▾
- docs▾
- feature▾
- imagemagick▾
- patch▾
- processors▾
- s3▾
- spam▾
- Apply to Selection
-
Change Color…
Preview:preview
- Rename…
- Delete












Good point. This is changed in master. Thanks.