Reputation: 53
I am currently trying to get image uploading to work on Rails 4. On my development server when I upload a file it only displays on the page as a string of text, and I get the following error in my console:
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/562.
[2019-12-10 13:35:01] ERROR Dragonfly::FunctionManager::UnableToHandle: None of the functions registered with #<Dragonfly::Encoder:0x007f92df90d1d8> were able to deal with the method call encode(<Dragonfly::TempObject pathname=#<Pathname:/Users/me/projects/boss/public/system/dragonfly/dev,:jpg). You may need to register one that can.
I have tried reinstalling ImageMagick and the delegates but I have observed no difference.
Here is the code for the display and the upload.
<%= image_tag @person.photo.jpg.url %>
<%= form_for @person, :html => {:multipart => true} do |f| %>
<div class="form-group">
<%= f.file_field :photo %>
</div>
<% end %>
Here is the current output:
Upvotes: 0
Views: 124