afeld / mustachio

automatic mustachifying of any image
https://mustachify.me
MIT License
344 stars 93 forks source link

NoMethodError - undefined method `-' for nil:NilClass: #25

Closed mcfiredrill closed 9 years ago

mcfiredrill commented 10 years ago

Just trying to run the app locally.

MUSTACHIO_REKOGNITION_KEY=xxxxxxxxxxxxxxxxxx MUSTACHIO_REKOGNITION_SECRET=xxxxxxxxxxxxxxxx bundle exec rackup
127.0.0.1 - - [20/Jun/2014 14:38:30] "GET /?src=http://www.librarising.com/astrology/celebs/images2/QR/queenelizabethii.jpg HTTP/1.1" 500 177106 3.1236
NoMethodError - undefined method `-' for nil:NilClass:
        /Users/tony/src/mustachio/lib/mustachio/factories.rb:100:in `block (3 levels) in <top (required)>'
        /Users/tony/src/mustachio/lib/mustachio/factories.rb:72:in `each'
        /Users/tony/src/mustachio/lib/mustachio/factories.rb:72:in `block (2 levels) in <top (required)>'
        /Users/tony/.rvm/gems/ruby-2.1.1/bundler/gems/magickly-cd17608a9c44/lib/magickly/convert/collapsing_convert.rb:30:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/bundler/gems/magickly-cd17608a9c44/lib/magickly/convert/collapsing_convert.rb:30:in `current_args'
        /Users/tony/.rvm/gems/ruby-2.1.1/bundler/gems/magickly-cd17608a9c44/lib/magickly/convert/collapsing_convert.rb:35:in `execute'
        /Users/tony/.rvm/gems/ruby-2.1.1/bundler/gems/magickly-cd17608a9c44/lib/magickly.rb:52:in `process_image'
        /Users/tony/.rvm/gems/ruby-2.1.1/bundler/gems/magickly-cd17608a9c44/lib/magickly.rb:35:in `process_src'
        /Users/tony/src/mustachio/lib/mustachio/app.rb:27:in `block in <class:App>'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1592:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1592:in `block in compile!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `[]'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (3 levels) in route!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in `route_eval'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (2 levels) in route!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:997:in `block in process_route'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `catch'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `process_route'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:955:in `block in route!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `each'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `route!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1067:in `block in dispatch!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1064:in `dispatch!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `block in call!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `call!'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:877:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/xss_header.rb:18:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/path_traversal.rb:16:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/json_csrf.rb:18:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.1/lib/rack/protection/frame_options.rb:31:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/show_exceptions.rb:21:in `call'
        /Users/tony/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:180:in `call'
afeld commented 9 years ago

So sorry for just responding to this now – completely missed it. Mind trying again with the latest version from master? There is better error handling now, so hopefully it will be more clear what the issue is. Feel free to reopen if you run into issues.