Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5.0 Error: couldn't json decode string got 743 #458

Open
adeelejaz opened this issue Sep 29, 2016 · 0 comments
Open

Rails 5.0 Error: couldn't json decode string got 743 #458

adeelejaz opened this issue Sep 29, 2016 · 0 comments

Comments

@adeelejaz
Copy link

On a new Rails 5.0 app, I'm getting the following error after uploading the images:

DRAGONFLY: couldn't json decode string - got 743: unexpected token at 'i٢'

My dragonfly initializer looks like this:

require 'dragonfly'

# Configure
Dragonfly.app.configure do
  plugin :imagemagick

  secret "snip"

  datastore :file,
      root_path: Rails.root.join('tmp', Rails.env),
      server_root: Rails.root.join('public') if Rails.env == 'development'

  datastore :s3,
      bucket_name: 'some-bucket',
      root_path: "some-path/#{Rails.env}",
      use_iam_profile: true unless Rails.env == 'development'
end

# Logger
Dragonfly.logger = Rails.logger

# Mount as middleware
Rails.application.middleware.use Dragonfly::Middleware

# Add model functionality
if defined?(ActiveRecord::Base)
  ActiveRecord::Base.extend Dragonfly::Model
  ActiveRecord::Base.extend Dragonfly::Model::Validations
end

Commenting out middleware line fixes the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant