kentonv / ssjekyll

"Hacker-CMS" Sandstorm App mashing up Jekyll, Ace Editor, and jsTree
Other
67 stars 18 forks source link

No such file or directory; name = /var/preview/index.html #4

Closed awans closed 9 years ago

awans commented 9 years ago

Default install of Hacker CMS on sandstorm prints this error by default.

screenshot 2015-02-19 15 06 25 screenshot 2015-02-19 15 06 55

Holler if there's any other useful debug info I can provide!

kentonv commented 9 years ago

Yikes.

@dwrensha Do you recognize the ruby error? Apparently it is happening only in the packaged version, not under spk dev, which is why I (embarrassingly) did not catch it.

(When upgrading an existing instance, everything looks good since it'll show the preview generated previously, so you have to actually try to change something to notice that it's busted. Sigh.)

dwrensha commented 9 years ago

What looks suspicious to me is that the package includes gems for both Ruby 1.9.1 and Ruby 2.1.0. Maybe the alwaysInclude in the pkgdef shouldn't include these lines:

 "usr/share/rubygems-integration/1.9.1/gems/pygments.rb-0.5.4",
"usr/share/rubygems-integration/1.9.1/gems/maruku-0.7.0"
kentonv commented 9 years ago

@dwrensha I agree those lines are outdated and should be updated to newer versions or removed, but that doesn't seem to fix the problem.

kentonv commented 9 years ago

It appears that RubyGems derives meaning from the presence or absence of zero-sized ".build_complete" files. It stat()s them without otherwise reading them.

OK, I've decided that stat()ing a zero-sized file under spk dev should pull it into the package (sandstorm commit 1e72c7f), but stat()ing non-empty files still doesn't.

I've pushed a new version of Hacker CMS which fixes the problems. I've also updated Jekyll to the latest version in Gems and set the shiny new appTitle field in the config.