Skip to content

Tumblr Migrator dies on audio posts #14

@mitchellhislop

Description

@mitchellhislop

Hello,

First - I am not a ruby guy, but I know enough to dig into pure ruby code.

I was trying to run the migrator, and it kept dying with:

/usr/lib/ruby/gems/1.8/gems/jekyll-0.11.2/lib/jekyll/migrators/tumblr.rb:72:in post_to_hash': undefined method 'at' for #Hash:0x7f56c4d622f8 (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/jekyll-0.11.2/lib/jekyll/migrators/tumblr.rb:27:in process'
from /usr/lib/ruby/gems/1.8/gems/jekyll-0.11.2/lib/jekyll/migrators/tumblr.rb:27:in map'
from /usr/lib/ruby/gems/1.8/gems/jekyll-0.11.2/lib/jekyll/migrators/tumblr.rb:27:in `process'
from -e:1

I dug into that line, dumped some vars, and figured out that it looks like the at function (due to a change in structure) was not there, but removing it worked fine:

when "audio"
          if !post["id3-title"].nil?
            title = post["id3-title"]
            content = post["audio-player"] + "<br/>" + post["audio-caption"]
          else
            title = post["audio-caption"]
            content = post["audio-player"]
          end

Sorry I can't contribute a pull request - I dont know near enough about gems or testing them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions