Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Address issue 773 (bugs preventing tumblr.rb from running) #775
I think that would work fine too. Rhetorical question is what's the difference. The answer is it'll be an absolute pathname instead of relative. The other pieces of code this needs to match up with -- 3 other references to the "_posts" directory in in tumblr.rb, one of which is in the same function self.rewrite_urls_and_redirects() and is visible two lines above in the diff above, and the other two of which are in self.process() -- all use relative paths to find it.
I have a hard time imagining it making a real difference, but I'm happy to change it. Is Jekyll::Post.new supposed to take only absolute paths? Glancing at the other migrators, tumblr.rb is the only one that calls it, and the others just use File.open("_posts/foo") and write directly to it.
def initialize(site, source, dir, name)
and all it does with source is
(and dir is used here, plus split on / to extract categories).
So it looks like any of "", ".", Dir.pwd would work fine.
Jan 27, 2013
1 check passed
I think this broke the migrator:
/Users/matthew/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.12.0/lib/jekyll/post.rb:44:in `initialize': No such file or directory - /Users/matthew/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.12.0/lib/jekyll/migrators/../_posts/tumblr/2013-01-26-auto-indenting-text-in-sublime-text-2.html in /Users/matthew/.rvm/gems/ruby-1.8.7-p352/gems/jekyll-0.12.0/lib/jekyll/migrators/../_posts/tumblr/2013-01-26-auto-indenting-text-in-sublime-text-2.html (Jekyll::FatalException)
Version 0.11 works fine.
Also, from the fact that the filename in your error message ends in .true, I think you're following an outdated and buggy version of https://github.com/mojombo/jekyll/wiki/blog-migrations (I updated that too; I don't know when/how that final 'true' argument to Tumblr.process was relevant or when it became irrelevant, but you don't want it now).
I tried with and without the 'true'.
dir = File.join(File.dirname(__FILE__), "..") ... jekyll_url = Jekyll::Post.new(site, dir, "", "tumblr/" + post[:name]).url
So please discard my original comment. Will build the gem from scratch
Right. So 0.12.0 looks under
The change you're commenting on here isn't in 0.12.0; it's in the current in-progress version. Either check out the source and use that, or use a previous released version like 0.11.0, I suppose.