paperclip

How to edit production.rb in my rails app to get it working using heroku and paperclip?

眉间皱痕 提交于 2019-12-12 01:12:21
问题 I am using paperclip + AWS in my rails app to upload images. When I reference images in my view as <%= image_tag product.avatar.url(:medium) %> current image urls are showing up as: http://s3.amazonaws.com/rockywolfugc/products/avatars/000/000/003/medium/59577_10100258833612183_1508749_n.jpg?1386876682 I need them to show up as: http://rockywolfugc.s3-us-west-2.amazonaws.com/products/avatars/000/000/003/medium/59577_10100258833612183_1508749_n.jpg?1386876682 At http://rubydoc.info/gems

Paperclip's error on a production server (unicorn)

£可爱£侵袭症+ 提交于 2019-12-11 22:17:48
问题 I use paperclip for upload images for post. For images there is a separate model, and posts has has_many relation. For uploading, http://github.com/Valums-File-Uploader/file-uploader is used. On local machine, all work fine (production and development mode). Production server (ubuntu 12.04) uses unicorn + nginx. And when I'm trying to upload images,I'm getting: Paperclip::AdapterRegistry::NoHandlerError (No handler found for # Unicorn::TeeInput:0x00000005cdd728 @len=619851, @chunked=false,

Mongoid-peperclip [paperclip] Content Type Spoof: Error

心已入冬 提交于 2019-12-11 19:59:54
问题 I need to upload some large CSV files via mongoid-paperclip and I am getting error Uploaded file2 my_file has an extension that does not match its contents . In terminal I can see this error as [paperclip] Content Type Spoof: my_file.csv (["text/csv", "text/comma-separated-values"]), content type discovered from file command: application/octet-stream. See documentation to allow this combination. Ok, I set validation as do_not_validate_attachment_file_type :my_file It does not help same error.

Error when uploading large file with Paperclip and AWS

↘锁芯ラ 提交于 2019-12-11 19:48:05
问题 My rails app on heroku allows a user to upload a photo to be stored on amazon web services S3 using paperclip. When the photo's size is above 1.5MB the app seems to time out. What is the best way to solve this problem? Here is the stack trace if that helps? E, [2013-10-07T14:15:57.018396 #5] ERROR -- : /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call' 2013-10-07T14:15:57.018974+00:00 app[web.2]: E, [2013-10-07T14:15:57.018430 #5] ERROR

Paperclip images failing to save in production rails

六眼飞鱼酱① 提交于 2019-12-11 19:13:44
问题 Im have just deployed a rails app which uses Paperclip to handle the file uploads to a linux ubuntu 10.04 server running apache2, passenger, rails 3.2.3 and ruby 1.9.3. My setup worked perfectly fine in development, however now in production images never save. i have commented out the following lines in production.rb so that rails deals with the file uploads and also tried using and installing XSendFile. # Specifies the header that your server uses for sending files # config.action_dispatch.x

Trouble styling divs on top of an image (css)

帅比萌擦擦* 提交于 2019-12-11 17:01:05
问题 I have a rails app that i've been working on, and one of the functionality aspects I do with it is that I ask the user to import an image (i'm using the paperclip gem to do that). Once they do that and finish creating everything else, I'm taking that image that is imported and using it as a background image for their page. Problem is.....i'm having serious problems actually doing that. My html (haml) looks like this #cafe_show .image_holding_div = image_tag @cafe.image.url(:medium) .cafe_info

paperclip installation error

谁说我不能喝 提交于 2019-12-11 16:27:33
问题 I cannot understand the reason for failing the installation: pkerur@ubuntu:~$ rails --version Rails 3.2.3 pkerur@ubuntu:~$ uname -a Linux ubuntu 3.2.0-24-generic #38-Ubuntu SMP Tue May 1 16:21:07 UTC 2012 i686 i686 i386 GNU/Linux pkerur@ubuntu:~$ ruby --version ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] pkerur@ubuntu:~$ sudo gem install paperclip ERROR: Error installing paperclip: paperclip requires Ruby version >= 1.9.2. pkerur@ubuntu:~$ 回答1: bundle install and ruby versions?

Rails Paperclip: missing required :bucket option

自闭症网瘾萝莉.ら 提交于 2019-12-11 15:03:51
问题 I've got Heroku working fine with paperclip, but I'm getting this error when I move the app over to a linux box, the logs show that imagemagick processing finishes and then it fails on upload: ArgumentError (missing required :bucket option): My application.yml includes: S3_BUCKET_NAME: "bucket" AWS_ACCESS_KEY_ID: "key" AWS_SECRET_ACCESS_KEY: "secret" I've doubled-checked that all of that info is correct. production.rb includes: config.paperclip_defaults = { :storage => :s3, :s3_credentials =>

Rails Image Not Showing Up With Paperclip

为君一笑 提交于 2019-12-11 14:16:33
问题 I am trying to get an avatar to show up on my main page. I am using Paperclip to do this. However, whenever I try to show the image I get this: This is what my code looks like: View: <head> </head> <body> <h1>Users</h1> <table> <tr> <th colspan="1"></th> </tr> <%= image_tag @user.avatar.url %> <%= debug @user.avatar.url %> <tr> <%= @user.username %> </tr> </table> </body> </html> The @user.username does display correctly. As does any other property I try to display. The debug statement

Views shows uploaded paperclip images as /original/missing.png

末鹿安然 提交于 2019-12-11 13:28:34
问题 I have Product model which are items in the e-commerce store and is configured with paperclip to i can upload images for the product model. When i add the image for the product, the image appears in /system/image/../.../.../thumbs and original but when i do <% for product in @products %> <%= link_to product.image.url(:original) %> <% end %> it appears broken links (/system/image/missing.png) when i browse the page. Similar to doing a group of thumbnails - i am trying to achieve to get all the