Giter VIP home page Giter VIP logo

Comments (1)

marco-solare avatar marco-solare commented on August 12, 2024

Hey there, I got the same error, however it turned out that my image was corrupted.

I used a downloaded a version of the piano.png of Ryan Bates Railscasts episode 332 (Refinery CMS Basics).
However I selected "save target as" on the image links shown here:
https://github.com/railscasts/episode-332/tree/master/images
which is nonsense of course as you have to click on the image to make it visible first.
I ended up with two 27 k "png" files which were basically corrupted files, not images. However I did not recognize it in the first place.

So it worked great with the actual images.

The actual problem seems to be an unhandled exception in Dragonfly (at least in my case). According to the Gemfile I am currently using version 2.0.0, this was the default after doing
gem install refinerycms

##note:##
maybe a file being too big causes the same behaviour than a corrupted file as its type/content may not be determined correctly.

##Excerpt from below:##
None of the functions registered with #Dragonfly::Analyser:0x0000000225c180 were able to deal
with the method call format(<Dragonfly::TempObject tempfile=#<File:/tmp/RackMultipart20120316-4990-5betch (closed)> >).
You may need to register one that can.

##The whole stacktrace:##

Started POST "/refinery/images?insert=true&modal=true&wymeditor=true" for 217.7.72.1 at 2012-03-16 09:06:04 +0000
Processing by Refinery::Admin::ImagesController#create as HTML
  Parameters: {"utf8"=>"รข", "authenticity_token"=>"BabTWp2CWtxgGfRz1Ml0rWWLxNM7sS4MWN03MsM5XcU=", "image"=>{"image"=>[#<ActionDispatch::Http::UploadedFile:0x000000046cadf0 @original_filename="piano.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"image[image][]\"; filename=\"piano.png\"\r\nContent-Type: image/png\r\n", @tempfile=#<File:/tmp/RackMultipart20120316-4990-5betch>>]}, "wymeditor"=>"true", "modal"=>"true", "dialog"=>"true", "insert"=>"true", "locale"=>:en}
  Refinery::Role Load (0.1ms)  SELECT "refinery_roles".* FROM "refinery_roles" WHERE "refinery_roles"."title" = 'Refinery' LIMIT 1
  Refinery::User Load (0.1ms)  SELECT "refinery_users".* FROM "refinery_users" INNER JOIN "refinery_roles_users" ON "refinery_users"."id" = "refinery_roles_users"."user_id" WHERE "refinery_roles_users"."role_id" = 1
  Refinery::User Load (0.1ms)  SELECT "refinery_users".* FROM "refinery_users" WHERE "refinery_users"."id" = 1 LIMIT 1
  Refinery::UserPlugin Load (0.1ms)  SELECT "refinery_user_plugins".* FROM "refinery_user_plugins" WHERE "refinery_user_plugins"."user_id" = 1 ORDER BY position ASC
  Refinery::Role Load (0.1ms)  SELECT "refinery_roles".* FROM "refinery_roles" INNER JOIN "refinery_roles_users" ON "refinery_roles"."id" = "refinery_roles_users"."role_id" WHERE "refinery_roles_users"."user_id" = 1
None of the functions registered with #<Dragonfly::Analyser:0x0000000225c180> were able to deal with the method call format(<Dragonfly::TempObject tempfile=#<File:/tmp/RackMultipart20120316-4990-5betch (closed)> >). You may need to register one that can.
None of the functions registered with #<Dragonfly::Analyser:0x0000000225c180> were able to deal with the method call width(<Dragonfly::TempObject tempfile=#<File:/tmp/RackMultipart20120316-4990-5betch (closed)> >). You may need to register one that can.
None of the functions registered with #<Dragonfly::Analyser:0x0000000225c180> were able to deal with the method call height(<Dragonfly::TempObject tempfile=#<File:/tmp/RackMultipart20120316-4990-5betch (closed)> >). You may need to register one that can.
   (0.1ms)  begin transaction
   (0.0ms)  rollback transaction
Completed 500 Internal Server Error in 112ms
ActionView::MissingTemplate (Missing template refinery/admin/images/create, refinery/admin/create with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
  * "/root/piano_plus/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/seo_meta-1.2.0/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-pages-2.0.2/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-resources-2.0.2/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-images-2.0.2/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-dashboard-2.0.2/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-authentication-2.0.2/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/devise-2.0.4/app/views"
  * "/usr/local/rvm/gems/ruby-1.9.3-p0/gems/refinerycms-core-2.0.2/app/views"
):
  actionpack (3.2.2) lib/action_view/path_set.rb:58:in `find'
  actionpack (3.2.2) lib/action_view/lookup_context.rb:109:in `find'
  actionpack (3.2.2) lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
  actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:29:in `determine_template'
  actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:10:in `render'
  actionpack (3.2.2) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.2) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.2) lib/abstract_controller/rendering.rb:109:in `_render_template'
  actionpack (3.2.2) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.2) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.2) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.2) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.2) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.2) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
  activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:39:in `render'
  actionpack (3.2.2) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.2) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (3.2.2) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.2) lib/active_support/callbacks.rb:502:in `_run__3282877894058149406__process_action__2874112767535543944__callbacks'
  activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.2) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.2) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
  activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.2) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.2) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.2) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.2) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.2) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `call'
  actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
  actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:30:in `call'
  journey (1.0.3) lib/journey/router.rb:68:in `block in call'
  journey (1.0.3) lib/journey/router.rb:56:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call'
  railties (3.2.2) lib/rails/engine.rb:479:in `call'
  railties (3.2.2) lib/rails/railtie/configurable.rb:30:in `method_missing'
  journey (1.0.3) lib/journey/router.rb:68:in `block in call'
  journey (1.0.3) lib/journey/router.rb:56:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call'
  warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
  warden (1.1.1) lib/warden/manager.rb:34:in `catch'
  warden (1.1.1) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  dragonfly (0.9.11) lib/dragonfly/cookie_monster.rb:9:in `call'
  activerecord (3.2.2) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `_run__1745328409776750205__call__2678393134929387463__callbacks'
  activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  dragonfly (0.9.11) lib/dragonfly/middleware.rb:13:in `call'
  dragonfly (0.9.11) lib/dragonfly/middleware.rb:13:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.2) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call'
  railties (3.2.2) lib/rails/engine.rb:479:in `call'
  railties (3.2.2) lib/rails/application.rb:220:in `call'
  rack (1.4.1) lib/rack/content_length.rb:14:in `call'
  railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call'
  rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
  /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
  /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
  /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'


  Rendered /usr/local/rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/missing_template.erb within rescues/layout (0.5ms)

from refinerycms-page-images.

Related Issues (20)

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.