Skip to content

Small fix: use default template if none given #31

wants to merge 1 commit into from

4 participants

karmi commented Mar 13, 2011


I've added a small fix: when rocco was being run without a template option, it would just fail. I think it's reasonable to use the bundled layout.mustache in this case.




Wow. That's a horrible, horrible bug. How did that happen? Taking a look at your patch.


Yeah. Not sure.


Actually, I don't think this is a bug. Or, at least it's not a bug that we should fix by specifying a filename.

New versions of Mustache need a different template path than old versions of Mustache, which got fixed in rtomayko/rocco@a2d316b I "fixed" that fix in rtomayko/rocco@d495074 which breaks once I run gem update.

Do you know what version this change popped up in, Ryan? If so, we should specify that version as a dependency (or figure out a clever mechanism that would enable both self.template_path = "#{File.dirname(__FILE__)}/.." and self.template_path = "#{File.dirname(__FILE__)}/.". :)

karmi commented Mar 17, 2011

Yeah, I was surprised by this -- but without this patch I just could not generate anything. It would always fail with layout.mustache not found or something. Maybe I did some other unrelated mistake?


This fixed it for me :)

cd lib/rocco
ln -s . rocco
@karmi karmi closed this Mar 20, 2011
@mikewest mikewest added a commit to mikewest/rocco that referenced this pull request Apr 19, 2011
@mikewest mikewest Fixing a bug in layout.rb's template directory location
Should take care of GH-31.  Thanks to [Karel Minarik][1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.