{"action":"created","issue":{"url":"https://api.github.com/repos/janko-m/shrine/issues/117","repository_url":"https://api.github.com/repos/janko-m/shrine","labels_url":"https://api.github.com/repos/janko-m/shrine/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/janko-m/shrine/issues/117/comments","events_url":"https://api.github.com/repos/janko-m/shrine/issues/117/events","html_url":"https://github.com/janko-m/shrine/issues/117","id":195280261,"number":117,"title":"Loading images via <attachment>_data_uri on fixtures is not working","user":{"login":"pablocrivella","id":1854923,"avatar_url":"https://avatars.githubusercontent.com/u/1854923?v=3","gravatar_id":"","url":"https://api.github.com/users/pablocrivella","html_url":"https://github.com/pablocrivella","followers_url":"https://api.github.com/users/pablocrivella/followers","following_url":"https://api.github.com/users/pablocrivella/following{/other_user}","gists_url":"https://api.github.com/users/pablocrivella/gists{/gist_id}","starred_url":"https://api.github.com/users/pablocrivella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablocrivella/subscriptions","organizations_url":"https://api.github.com/users/pablocrivella/orgs","repos_url":"https://api.github.com/users/pablocrivella/repos","events_url":"https://api.github.com/users/pablocrivella/events{/privacy}","received_events_url":"https://api.github.com/users/pablocrivella/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T15:18:36Z","updated_at":"2016-12-13T15:32:40Z","closed_at":null,"body":"### Details\r\n\r\nshrine gem version:  2.3.1\r\nruby version: 2.3.1\r\nrails: 5.0.0.1\r\n\r\nconfig/shrine.rb\r\n```ruby\r\nrequire 'shrine'\r\nrequire 'shrine/storage/file_system'\r\n\r\nShrine.storages = {\r\n  cache: Shrine::Storage::FileSystem.new('public', prefix: 'uploads/cache'),\r\n  store: Shrine::Storage::FileSystem.new('public', prefix: 'uploads/store')\r\n}\r\n\r\nShrine.plugin :activerecord\r\nShrine.plugin :cached_attachment_data\r\nShrine.plugin :determine_mime_type\r\nShrine.plugin :validation_helpers\r\nShrine.plugin :data_uri\r\n\r\n```\r\n\r\napp/models/image_block.rb\r\n```\r\nclass ImageBlock < ApplicationRecord\r\n  include ImageUploader[:image]\r\n  belongs_to :page\r\nend\r\n```\r\n\r\napp/uploaders/image_uploader.rb\r\n```ruby\r\nrequire 'image_processing/mini_magick'\r\n\r\nclass ImageUploader < Shrine\r\n  include ImageProcessing::MiniMagick\r\n  plugin :processing\r\n  plugin :versions\r\n\r\n  process(:store) do |io, _context|\r\n    original = io.download\r\n    large    = resize_to_fill(original, 1400, 660, gravity: 'North')\r\n    medium   = resize_to_fill(original, 700, 400, gravity: 'North')\r\n    small    = resize_to_fill(original, 350, 200, gravity: 'North')\r\n\r\n    { original: original, large: large, medium: medium, small: small }\r\n  end\r\n\r\n  Attacher.validate do\r\n    validate_mime_type_inclusion %w(image/jpeg image/png image/gif), message: I18n.t('errors.messages.invalid_image')\r\n  end\r\nend\r\n```\r\n\r\nfixture file\r\n```yaml\r\nabout_main_image:\r\n  page: about\r\n  identifier: about_main_image\r\n  image_data_uri: \"data:image/png;base64,<%= Base64.encode64(File.binread(\"app/assets/images/homepage_header.jpg\")) %>\"\r\n```\r\n\r\nException message\r\n```\r\nActiveRecord::Fixture::FixtureError: table \"image_blocks\" has no column named \"image_data_uri\".\r\n```"},"comment":{"url":"https://api.github.com/repos/janko-m/shrine/issues/comments/266769646","html_url":"https://github.com/janko-m/shrine/issues/117#issuecomment-266769646","issue_url":"https://api.github.com/repos/janko-m/shrine/issues/117","id":266769646,"user":{"login":"pablocrivella","id":1854923,"avatar_url":"https://avatars.githubusercontent.com/u/1854923?v=3","gravatar_id":"","url":"https://api.github.com/users/pablocrivella","html_url":"https://github.com/pablocrivella","followers_url":"https://api.github.com/users/pablocrivella/followers","following_url":"https://api.github.com/users/pablocrivella/following{/other_user}","gists_url":"https://api.github.com/users/pablocrivella/gists{/gist_id}","starred_url":"https://api.github.com/users/pablocrivella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablocrivella/subscriptions","organizations_url":"https://api.github.com/users/pablocrivella/orgs","repos_url":"https://api.github.com/users/pablocrivella/repos","events_url":"https://api.github.com/users/pablocrivella/events{/privacy}","received_events_url":"https://api.github.com/users/pablocrivella/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T15:32:40Z","updated_at":"2016-12-13T15:32:40Z","body":"@janko-m Oh that's too bad :( but thank you very much for letting me know! If i find a work-around i'll post it here!"}}
{"actor":{"display_login":"pablocrivella"}}