GithubHelp home page GithubHelp logo

avatar_magick's People

Contributors

bjedrocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

avatar_magick's Issues

Causes undefined method error for avatar_size

When following the tutorial on: http://markevans.github.io/dragonfly/rails to allow a user to upload a photo for a model, I get this error: undefined method 'avatar_size=' for #<User:0x007fe56740aac0>.
Happens when trying to update the attributes:

def update
    @user = User.find(params[:id])
    if @user.update_attributes(update_user_params)
      redirect_to users_path
    else
      render 'edit'
...

The params are:

def update_user_params
  params.require(:user).permit(:avatar)
end

Disabling the concern fixes the issue... Any ideas why?

Text is clipped

The text looks to get clipped at the top of the glyphs. Using font: 'Helvetica-Bold' but I see this with other fonts as well. Also the text doesn't look to be quite vertically centred... looks a little too high.

Dragonfly: 1.1.5
Avatar Magick version: 1.0.2
ImageMagick version:

Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-03-25 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib

image

Text not centered

The initials are appearing off center - closer to the top:

avatar

Any ideas? Not adjusting any options other than background colour.

dragonfly (1.0.10)
rails (4.2.4)

Does this work on Heroku?

I have Dragonfly setup on Heroku to use S3. Adding this gem reports the following error when trying to run:

DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '48' '-font' 'Helvetica' '-fill' '#FFFFFF' '-background' '#f57f17' 'label:AC' '/tmp/dragonfly20170224-6-3eai6x.png')
with exit status 1 and stderr convert.im6:
no images defined `/tmp/dragonfly20170224-6-3eai6x.png' @ error/convert.c/ConvertImageCommand/3044.

Internal Server Error

I'm working on developing a avatar_magick rails app that was working good with deployment method capistrano, and now i've changed deployment method to phusionpassenger.
Now no image is loaded. When I access the image link I get the error 500 internal server error.

What is causing this issue? Here's the stacktrace of the error.

W, [2017-04-26T20:18:36.364591 #17575]  WARN -- : [43525c93-c9e7-4496-a20d-401cdc58cc17] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#546e7a' 'label:IEC' '/tmp/dragonfly20170426-17575-10zie6l.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.367442 #16597]  WARN -- : [7ba3461b-b72d-4879-aee4-a653e7e15268] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '64' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#1e88e5' 'label:IT' '/tmp/dragonfly20170426-16597-1uzs2on.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.371409 #17575]  WARN -- : [8a3c2c19-f4a9-42e4-9ba1-9c330c5188a4] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#311b92' 'label:MDS' '/tmp/dragonfly20170426-17575-np3qkt.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.372581 #16597]  WARN -- : [b6083fe5-f628-4f80-9867-3deb845b2741] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '64' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#ffb300' 'label:GA' '/tmp/dragonfly20170426-16597-1v6ujoa.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.376203 #17575]  WARN -- : [a369486e-0929-4090-a08f-c2c544d54023] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '64' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#212121' 'label:SR' '/tmp/dragonfly20170426-17575-nvus7y.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.379422 #16597]  WARN -- : [9c29275a-c35f-4a07-93cc-7ce5d80ba628] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '64' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#1a237e' 'label:GT' '/tmp/dragonfly20170426-16597-y6hc3a.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.383431 #17575]  WARN -- : [9a1573be-4877-4fbc-8239-3964053491ef] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#00897b' 'label:FPE' '/tmp/dragonfly20170426-17575-15luoim.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.384616 #16597]  WARN -- : [f2adfe7f-95dd-4bee-ae41-6ff60bb00e3f] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#f57f17' 'label:ETL' '/tmp/dragonfly20170426-16597-1ff7ccb.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.387877 #17575]  WARN -- : [4ea4690e-57d8-49e0-a092-0a9fc7ab7674] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#4a148c' 'label:CVA' '/tmp/dragonfly20170426-17575-deu9n3.png') with exit status 127 and stderr sh: 1: convert: not found

F, [2017-04-26T20:18:36.388965 #17575] FATAL -- : [5b2abd61-0757-4086-85c6-50d32c33488f]
F, [2017-04-26T20:18:36.389053 #17575] FATAL -- : [5b2abd61-0757-4086-85c6-50d32c33488f] ActionController::RoutingError (No route matches [GET] "/avatar/128/01579b/VALEBRAS%20PROD.CONSTR.%20CIVIL%20LTDA"):
F, [2017-04-26T20:18:36.389083 #17575] FATAL -- : [5b2abd61-0757-4086-85c6-50d32c33488f]
F, [2017-04-26T20:18:36.389114 #17575] FATAL -- : [5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:36:in `call_app'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:24:in `block in call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:69:in `block in tagged'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:26:in `tagged'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:69:in `tagged'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:24:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/request_id.rb:24:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/dragonfly-1.0.12/lib/dragonfly/cookie_monster.rb:9:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/ssl.rb:84:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/engine.rb:522:in `call'
[5b2abd61-0757-4086-85c6-50d32c33488f] /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
[5b2abd61-0757-4086-85c6-50d32c33488f] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:in `accept_and_process_next_request'
[5b2abd61-0757-4086-85c6-50d32c33488f] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
[5b2abd61-0757-4086-85c6-50d32c33488f] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
[5b2abd61-0757-4086-85c6-50d32c33488f] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
W, [2017-04-26T20:18:36.391432 #16597]  WARN -- : [b077eb68-8d44-4de9-a42a-fe126f94b3e1] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#1a237e' 'label:OTL' '/tmp/dragonfly20170426-16597-8kzlpl.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.395850 #17575]  WARN -- : [fbd8bb69-8dab-4737-8779-3adff60d6d59] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#00acc1' 'label:OCE' '/tmp/dragonfly20170426-17575-u8zaso.png') with exit status 127 and stderr sh: 1: convert: not found

W, [2017-04-26T20:18:36.396310 #16597]  WARN -- : [108183ef-5ca8-46c3-bbf6-611d38e6d343] DRAGONFLY: caught error - Command failed ('convert' '-gravity' 'none' '-antialias' '-pointsize' '42' '-font' 'Arial-Regular' '-fill' '#FFFFFF' '-background' '#33691e' 'label:DST' '/tmp/dragonfly20170426-16597-13cl66q.png') with exit status 127 and stderr sh: 1: convert: not found

This is my code config\initializers\dragonfly.rb:

require 'dragonfly'

Dragonfly.app.configure do
  plugin :imagemagick
  plugin :avatarmagick

  secret "my-secret"

  url_format "/media/:job/:name"

  datastore :file,
    root_path: Rails.root.join('public/system/dragonfly', Rails.env),
    server_root: Rails.root.join('public')
end

Dragonfly.logger = Rails.logger

Rails.application.middleware.use Dragonfly::Middleware

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.