Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

failure with recording S3 uploads through carrierwave #198

Closed
nclark opened this Issue · 2 comments

2 participants

Neal Clark Myron Marston
Neal Clark

this issue is a follow up to the email thread here.

demo repository here.

it works when "hooking into" webmock & excon, but not when "hooking into" webmock by itself. you can see the difference by reverting the last commit. you will need a config/settings.yml with:

test:
  aws_access_key_id: [your aws access key id]
  aws_secret_access_key: [your aws secret access key]
  asset_bucket: [your test bucket]

i'm not sure where the issue is, vcr, webmock, or elsewhere. but changing

  VCR.configure do |c|
    # ...
    c.hook_into :webmock
  end

to

  VCR.configure do |c|
    #...
    c.hook_into :excon, :webmock
  end

gets the test passing.

Myron Marston

@nclark -- thanks for putting in the effort to come up with a demo of your problem!

@Jacobkg -- do you want to take a stab at investigating this?

Myron Marston

I found a bug in WebMock that was causing the problem. I have a PR open that fixes it:

bblimke/webmock#213

This makes the spec in your example app pass if your factory uses File.open. If your factory uses IO.read, then I get the invalid byte sequence in UTF-8 error, but looking at the backtrace, I see that VCR isn't involved at all. In fact, that error happens in activesupport--the string returned by IO.read is tagged as UTF-8 (due to the fact that your default external encoding is UTF-8), and when you use some_binary_string_tagged_as_utf_8 =~ //, that's the error you get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.