NoMethodError #297

travisjtodd opened this Issue Feb 28, 2013 · 3 comments


None yet

2 participants


I'm seeing when parsing images from Amazon.

NoMethodError: undefined method `path' for #<String:0x007fcfd1584460>
    from /Users/travisjtodd/.rvm/gems/ruby-1.9.3-p362/gems/mechanize-2.5.1/lib/mechanize/page/image.rb:65:in `extname'
    from /Users/travisjtodd/.rvm/gems/ruby-1.9.3-p362/gems/mechanize-2.5.1/lib/mechanize/page/image.rb:118:in `mime_type'
    from (irb):22
    from /Users/travisjtodd/.rvm/gems/ruby-1.9.3-p362/bundler/gems/rails-9d023c87de98/railties/lib/rails/commands/console.rb:88:in `start'
    from /Users/travisjtodd/.rvm/gems/ruby-1.9.3-p362/bundler/gems/rails-9d023c87de98/railties/lib/rails/commands/console.rb:9:in `start'
    from /Users/travisjtodd/.rvm/gems/ruby-1.9.3-p362/bundler/gems/rails-9d023c87de98/railties/lib/rails/commands.rb:64:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

Can you show me an example I can reproduce this issue with?


Here's how I hit it:

uri = ""
@agent =
@page = @agent.get(uri)
@leejarvis leejarvis closed this in 031b9e5 Mar 1, 2013

It looks like this breaks the build on Ruby 1.8.7 and 1.9.2 I don't have those versions available to me right now so I'll clean this up later

@leejarvis leejarvis reopened this Mar 1, 2013
@leejarvis leejarvis closed this Mar 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment