nanoc 2.1.6 released

6 views
Skip to first unread message

Denis Defreyne

unread,
Feb 28, 2009, 3:27:11 AM2/28/09
to na...@googlegroups.com
Hi.

nanoc 2.1.6 has been released. This release fixes a handful of bugs
and improves compatibility with RDoc. For a full list of changes, see
the 2.1.6 release blog post at <http://nanoc.stoneship.org/blog/2009-02-28/
>.

Update your copy of nanoc the usual way by issuing the "gem update"
command, like this:

sudo gem update nanoc

Enjoy, and be sure to let me know if you have any issues with this
release!

Regards,

Denis

--
Denis Defreyne
denis.d...@stoneship.org

Roy

unread,
Mar 3, 2009, 6:08:40 AM3/3/09
to na...@googlegroups.com
Hi Dennis,

I have got a problem but I don't know if it is related to this release.

I created a new site with nanoc, and run 63 times for "nanoc create_page [number]".
It is fine on first 62 create page command, but in the 63th time, it will say "A template named 'default' was not found; aborting."

And when I try to compile the site, it will say

Compiling site...

ERROR: An exception occured while compiling /1/ (rep default).

If you think this is a bug in nanoc, please do report it at <http://nanoc.stoneship.org/trac/newticket> -- thanks!

Message:
  Unknown layout: default

Compilation stack:
  - [page]   /1/ (rep default)

Backtrace:
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/page_rep.rb:172:in `layout'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/page_rep.rb:291:in `do_layout'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/page_rep.rb:233:in `compile'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/compiler.rb:59:in `run'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/compiler.rb:57:in `each'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/base/compiler.rb:57:in `run'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/cli/commands/compile.rb:74:in `run'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/../lib/nanoc/cli/base.rb:85:in `run'
  - /Users/royuen/.gem/ruby/1.8/gems/nanoc-2.1.6/bin/nanoc:12
  - /usr/bin/nanoc:19:in `load'
  - /usr/bin/nanoc:19


Hope you can help me. Thanks a lot!

Best,
Roy

Denis Defreyne

unread,
Mar 3, 2009, 1:27:15 PM3/3/09
to na...@googlegroups.com
3 Mar 2009 kl. 12:08 skrev Roy:

> It is fine on first 62 create page command, but in the 63th time, it
> will say "A template named 'default' was not found; aborting."
>

> And when I try to compile the site, it will say [..] Unknown layout:
> default

Hi Roy,

The problem you're experiencing is certainly an odd one, but it is one
that I have experienced myself.

For me, the problem never was reproducible. nanoc would throw the
error, but on the next try it would simply continue without issues.
Especially the autocompiler is susceptible to such errors (but I have
to stress that, for me, those errors are extremely rare).

Is your problem reproducible? If you try multiple times to create the
63rd page, do you keep getting the error? When compiling the site, do
you keep getting the "unknown layout" error?

If you want, you can send me the source for your nanoc site and I'll
take a look to see whether I can fix the problem in nanoc.

roberthahn

unread,
Apr 2, 2009, 11:10:20 PM4/2/09
to nanoc
Denis:

I was able to reproduce the error.

My site is supposed to be 125 pages at the time of launch. I haven't
reproduced this from scratch, but this is what appears to be the steps
to reproduce:

1. Create a 124 page site.
2. Run nanoc co -a to compile it. notice it works fine.
3. Run nanoc cp about to create an about page. Edit to suit.
4. Run nanoc co -a. It fails with the " Unknown layout: default "
message when generating the about page (which happens to come first in
alphabetical order in my site).
5. Run nanoc cp aaa. it fails with "A template named 'default' was not
found; aborting."
6. manually create the aaa directory, with associated html and yaml
files.
7. run nanoc co -a. Site compiles successfully

You'll notice that Roy's bug happened on a 63 page site -- i have
verified that the above steps would be reproducible on a site that
size. (start with 62 pages in step 1 instead of 124 pages). When I
tried to reproduce it, i made a copy of my 125 -- er, 126 page site
(since we know it breaks on 125 pages) and deleted enough pages to
make it 62 pages large.

baffling. If there's anything more you'd like to know, please ask.

-rh

On Mar 3, 2:27 pm, Denis Defreyne <denis.defre...@stoneship.org>
wrote:
> denis.defre...@stoneship.org

Denis Defreyne

unread,
Apr 4, 2009, 4:18:07 AM4/4/09
to na...@googlegroups.com
Hi Robert,

I'm afraid I cannot reproduce the error in the way you described (with
a new site, that is). I never get any "unknown layout" or "unknown
template" errors using 2.1.6.

I have no idea whether it's relevant, but the numbers 62/63 and
124/125/126 are rather close to the "magic" numbers 64 and 128 (2**6
and 2**7). Odd... but maybe I'm just seeing patterns where there
aren't any...

Would it be possible for you to send the site source to me (in
private) so I can check out what is causing the error? I can't really
see a different way of reproducing it...

Thanks,

Denis
--
Denis Defreyne
denis.d...@stoneship.org

Roy Yuen

unread,
Apr 28, 2009, 4:58:17 AM4/28/09
to nanoc
Hi Denis,

After my initial investigation, it may be happened in Mac OS only,
because I can't reproduce the problem in Windows or Unix system.

When it hits specific page count, say 63 times, the first line in
meta_filesnames(base) of filesystem.rb would have problem:

filenames = Dir[base+'/**/*.yaml'] will return [], but when I remove
one page, then it returns all yaml files as normal, strange!

Best,
Roy

On Apr 4, 4:18 pm, Denis Defreyne <denis.defre...@stoneship.org>
> denis.defre...@stoneship.org

Denis Defreyne

unread,
Apr 28, 2009, 7:39:16 AM4/28/09
to na...@googlegroups.com
On 28 Apr 2009, at 10:58, Roy Yuen wrote:

> After my initial investigation, it may be happened in Mac OS only,
> because I can't reproduce the problem in Windows or Unix system.
>
> When it hits specific page count, say 63 times, the first line in
> meta_filesnames(base) of filesystem.rb would have problem:
>
> filenames = Dir[base+'/**/*.yaml'] will return [], but when I remove
> one page, then it returns all yaml files as normal, strange!

Hi,

That is indeed a very strange issue. I am using Mac OS X as well. It'd
be quite useful for me if you can (and want to) send the source of
your site with 63 pages so I can investigate this issue.

Thanks,

Reply all
Reply to author
Forward
0 new messages