laktek / punch

A fun and easy way to build modern websites
http://laktek.github.com/punch
MIT License
1.17k stars 107 forks source link

Hands-on tutorial loads blank page #102

Open Auk14HP opened 10 years ago

Auk14HP commented 10 years ago

I recently got around this issue by reinstalling punch via GitBash. After running punch setup site; cd site; punch s (as directed by the tutorial), I then navigated to http://localhost:9009 in Chrome but all that was displayed was a blank page.

I cruised the issues looking for something similar and came across this, but after trying it's solution (delete npm's cache and reinstall punch) I'm still running into the same issue.

I'm using Windows 7, if that helps at all.

Auk14HP commented 10 years ago

Any updates on this issue? I'd really like to start using Punch, but being unable to progress through the tutorial is really hindering me.

laktek commented 10 years ago

@Auk14HP I'll try setting up Punch on a Windows 7 machine and see if there are any issues. Last time I checked on a Windows 8 tutorial did work fine.

laktek commented 10 years ago

Meanwhile, you can use a cloud based dev environment like Nitrous.IO to try out Punch.

tclaeys commented 10 years ago

I'm also using punch on Windows 7, 64 bit. I'm facing a similar problem as described above. Partials are not rendered.

I fixed the issue by adjusting the following file:lib/template_handler.js - line 235.

    _.each(basePath.split(Path.sep || "/"), function(current_dir_entry){

replaced by

    _.each(basePath.split("/"), function(current_dir_entry){

Path.sep returns \ on Windows 7, which will not work in this case.. As the basePath is always(?) starting with a /? At least basePath returns by default "/index". Applying this change allows to do a proper lookup of the parent folder (.) and find the default _partials.

Can you please have look and fix it accordingly?

Thanks!

s-oram commented 9 years ago

I've applied the fix above and sent a pull request. https://github.com/laktek/punch/pull/118