samedi 24 juin 2017

Getting "Expected(200) <=> Actual(400 Bad Request)" error for asset_sync gem

I am trying to set up existing rails 3.2.11 project in production environment.

We have used asset_sync gem for syncing assets in s3. But when I ran the precompile command I am getting Expected(200) <=> Actual(400 Bad Request) error. As per the documentation I have added required configuration in the file (application.yml file).

production:
  FOG_DIRECTORY: xxxxxx
  FOG_PROVIDER: xxxxxx
  FOG_REGION: xxxxxx
  ASYNC_UPLOAD_BUCKET: xxxxxx
  AWS_ACCESS_KEY_ID: xxxxxx
  AWS_BUCKET: xxxxxx
  AWS_SECRET_ACCESS_KEY: xxxxxx

As per the doc created separate initializer file (config/initializers/asset_sync.rb)

AssetSync.configure do |config|
  config.fog_provider = 'AWS'
  config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID']
  config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
  config.fog_directory = ENV['FOG_DIRECTORY']
  config.fog_region = ENV['FOG_REGION']
end

When I checked the response for the compilation it is showing message

<Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message>  

Can any one let me know how can I fix this issue.

Aucun commentaire:

Enregistrer un commentaire