Skip to content

Instantly share code, notes, and snippets.

@raphinesse raphinesse/Rules Secret
Created Nov 3, 2013

Embed
What would you like to do?
Crashlog created at 2013-11-03 22:38:25 +0100
===== MESSAGE:
NoMethodError: undefined method `attributes' for nil:NilClass
===== COMPILATION STACK:
- [item] / (rep default)
===== STACK TRACE:
0. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/filters/handlebars.rb:21:in `run'
1. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/filter.rb:122:in `setup_and_run'
2. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/result_data/item_rep.rb:344:in `filter'
3. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/item_rep_proxy.rb:47:in `filter'
4. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/rule_context.rb:55:in `filter'
5. ./Rules:24:in `block in load'
6. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/rule.rb:68:in `instance_eval'
7. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/rule.rb:68:in `apply_to'
8. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/compiler.rb:384:in `compile_rep'
9. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/compiler.rb:340:in `block in compile_reps'
10. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/compiler.rb:333:in `loop'
11. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/compiler.rb:333:in `compile_reps'
12. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/compilation/compiler.rb:89:in `run'
13. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/base/source_data/site.rb:58:in `compile'
14. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/commands/compile.rb:363:in `block in run'
15. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/commands/compile.rb:404:in `run_listeners_while'
16. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/commands/compile.rb:362:in `run'
17. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/command_runner.rb:14:in `block in call'
18. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/error_handler.rb:70:in `handle_while'
19. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/error_handler.rb:26:in `handle_while'
20. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/command_runner.rb:13:in `call'
21. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib/cri/command_dsl.rb:185:in `block in runner'
22. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib/cri/command.rb:296:in `call'
23. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib/cri/command.rb:296:in `run_this'
24. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib/cri/command.rb:249:in `run'
25. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib/cri/command.rb:262:in `run'
26. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli.rb:52:in `block in run'
27. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/error_handler.rb:70:in `handle_while'
28. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli/error_handler.rb:26:in `handle_while'
29. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib/nanoc/cli.rb:50:in `run'
30. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/bin/nanoc:19:in `<top (required)>'
31. /home/raphinesse/bin/nanoc:23:in `load'
... 34 more lines omitted. See full crash log for details.
===== VERSION INFORMATION:
nanoc 3.6.5 © 2007-2013 Denis Defreyne.
Running ruby 1.9.3 (2013-06-27) on x86_64-linux with RubyGems 1.8.25.
===== SYSTEM INFORMATION:
Linux localhost.localdomain 3.8.11-200.fc18.x86_64 #1 SMP Wed May 1 19:44:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
===== INSTALLED GEMS:
bigdecimal 1.1.0
colored 1.2
commonjs 0.2.7
cri 2.4.0
handlebars 0.5.0
handlebars-source 1.0.12
io-console 0.3
json 1.6.8
libv8 3.16.14.3
nanoc 3.6.5
rdoc 3.12
ref 1.0.5
therubyracer 0.12.0
===== ENVIRONMENT:
COLORTERM => "gnome-terminal"
DBUS_SESSION_BUS_ADDRESS => "unix:abstract=/tmp/dbus-LKsvn9pLzB,guid=0823128032a900a9a0f3663e5276bae4"
DESKTOP_SESSION => "gnome"
DISPLAY => ":0"
GDMSESSION => "gnome"
GJS_DEBUG_OUTPUT => "stderr"
GJS_DEBUG_TOPICS => "JS ERROR;JS LOG"
GNOME_DESKTOP_SESSION_ID => "this-is-deprecated"
GNOME_KEYRING_CONTROL => "/run/user/1000/keyring-rxPbWC"
GNOME_KEYRING_PID => "1373"
GPG_AGENT_INFO => "/run/user/1000/keyring-rxPbWC/gpg:0:1"
HISTCONTROL => "ignoredups"
HISTSIZE => "1000"
HOME => "/home/raphinesse"
HOSTNAME => "localhost.localdomain"
IMSETTINGS_INTEGRATE_DESKTOP => "yes"
IMSETTINGS_MODULE => "none"
KRB5CCNAME => "DIR:/run/user/1000/krb5cc_5fedb364a549b9ecd67591cc5276bab0"
LANG => "en_US.UTF-8"
LC_MEASUREMENT => "de_DE.utf8"
LC_MONETARY => "de_DE.utf8"
LC_NUMERIC => "de_DE.utf8"
LC_TIME => "de_DE.utf8"
LESSOPEN => "||/usr/bin/lesspipe.sh %s"
LOGNAME => "raphinesse"
LS_COLORS => "rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lz=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.bz=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:"
MAIL => "/var/spool/mail/raphinesse"
OLDPWD => "/home/raphinesse"
PATH => "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/raphinesse/.local/bin:/home/raphinesse/bin"
PWD => "/home/raphinesse/hbs-test"
QT_IM_MODULE => "ibus"
SESSION_MANAGER => "local/unix:@/tmp/.ICE-unix/1375,unix/unix:/tmp/.ICE-unix/1375"
SHELL => "/bin/bash"
SHLVL => "2"
SSH_AUTH_SOCK => "/run/user/1000/keyring-rxPbWC/ssh"
TERM => "xterm-256color"
USER => "raphinesse"
USERNAME => "raphinesse"
WINDOWID => "52428805"
WINDOWPATH => "1"
XAUTHORITY => "/var/run/gdm/auth-for-raphinesse-O1e6WP/database"
XDG_MENU_PREFIX => "gnome-"
XDG_RUNTIME_DIR => "/run/user/1000"
XDG_SEAT => "seat0"
XDG_SESSION_ID => "2"
XDG_VTNR => "1"
XMODIFIERS => "@im=ibus"
_ => "/home/raphinesse/bin/nanoc"
===== LOAD PATHS:
0. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib
1. /home/raphinesse/.gem/ruby/1.9.1/gems/colored-1.2/lib
2. /home/raphinesse/.gem/ruby/1.9.1/gems/cri-2.4.0/lib
3. /home/raphinesse/.gem/ruby/1.9.1/gems/nanoc-3.6.5/lib
4. /home/raphinesse/.gem/ruby/1.9.1/gems/ref-1.0.5/lib
5. /home/raphinesse/.gem/ruby/1.9.1/gems/libv8-3.16.14.3-x86_64-linux/lib
6. /home/raphinesse/.gem/ruby/1.9.1/gems/libv8-3.16.14.3-x86_64-linux/ext
7. /home/raphinesse/.gem/ruby/1.9.1/gems/therubyracer-0.12.0/lib
8. /home/raphinesse/.gem/ruby/1.9.1/gems/therubyracer-0.12.0/ext
9. /home/raphinesse/.gem/ruby/1.9.1/gems/commonjs-0.2.7/lib
10. /home/raphinesse/.gem/ruby/1.9.1/gems/handlebars-source-1.0.12/lib
11. /home/raphinesse/.gem/ruby/1.9.1/gems/handlebars-0.5.0/lib
12. /usr/local/share/ruby/site_ruby
13. /usr/local/lib64/ruby/site_ruby
14. /usr/share/ruby/vendor_ruby
15. /usr/lib64/ruby/vendor_ruby
16. /usr/share/rubygems
17. /usr/share/ruby
18. /usr/lib64/ruby
#!/usr/bin/env ruby
# A few helpful tips about the Rules file:
#
# * The string given to #compile and #route are matching patterns for
# identifiers--not for paths. Therefore, you can’t match on extension.
#
# * The order of rules is important: for each item, only the first matching
# rule is applied.
#
# * Item identifiers start and end with a slash (e.g. “/about/” for the file
# “content/about.html”). To select all children, grandchildren, … of an
# item, use the pattern “/about/*/”; “/about/*” will also select the parent,
# because “*” matches zero or more characters.
compile '/stylesheet/' do
# don’t filter or layout
end
compile '*' do
if item.binary?
# don’t filter binary items
else
filter :handlebars
layout 'default'
end
end
route '/stylesheet/' do
'/style.css'
end
route '*' do
if item.binary?
# Write item with identifier /foo/ to /foo.ext
item.identifier.chop + '.' + item[:extension]
else
# Write item with identifier /foo/ to /foo/index.html
item.identifier + 'index.html'
end
end
layout '*', :erb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.