winton / stasis

Static sites made powerful
http://stasis.me
MIT License
679 stars 56 forks source link

Ignoring controller.rb inside /vendor/bundle #61

Open Bastes opened 12 years ago

Bastes commented 12 years ago

I've bumped into a strange problem when bundling my gems inside my project's /vendor/bundle directory, it looks like stasis is attempting (and failing) at executing controller.rb files inside the stasis gem directory.

Maybe stasis should ignore all controller.rb files found under this directory ?

Bastes commented 12 years ago

This problem is getting really annoying ; could someone at least point me to where the controllers are searched and loaded so that I can try and fix the problem ?

kammerer commented 12 years ago

Hmm, for me it works without any errors. Can you be more specifiic? Does adding ignore /\/vendor/ to controller.rb help?

Bastes commented 12 years ago

Yep, from what I've read in stasis's code the controllers are first rounded up then executed, si whatever's in the main controller doesn't do much.

For now I've worked around it by creating a subdirectory under my main project so the vendor isn't a subdirectory when I'm calling stasis, and I'm working on a way to exclude /vendor altogether from looked-up directories when it comes to templates and controllers. I'll send a pull request when I'm done.