undefined method `size' for nil:NilClass
paulradzkov opened this issue · comments
Hi. I have trouble with compiling. Here the log:
D:\Dropbox\nanoc\avdgaag-nanoc-template-c56521c>nanoc compile
Loading site data...
Compiling site...
Captain! We've been hit!
=== MESSAGE:
Gem::LoadError: You have already activated coffee-script-source 1.1.2, but your
Gemfile requires coffee-script-source 1.1.1. Using bundle exec may solve this.
Captain! We've been hit!
=== MESSAGE:
NoMethodError: undefined method `size' for nil:NilClass
=== COMPILATION STACK:
(empty)
=== BACKTRACE:
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:173:in `resolution_for'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:76:in `print_error'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:46:in `rescue in handle_while'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:34:in `handle_while'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/command.rb:50:in `call'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/command.rb:43:in `call'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/commands/compile.rb:24:in `block in define'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:255:in `call'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:255:in `run'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:272:in `run'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli.rb:40:in `block in run'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:42:in `handle_while'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli.rb:37:in `run'
- C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/bin/nanoc3:12:in `<top (required)>'
- C:/Ruby192/bin/nanoc3:19:in `load'
- C:/Ruby192/bin/nanoc3:19:in `'
It seems you are using Bundler to handle your gems, so you should run bundle exec nanoc compile
instead of nanoc compile
.
Thanks. May be should to write this in readme or wiki for beginners like me.
I agree the solution to this problem is far from obvious, but it is actually a trivial usage issue with the Bundler and Nanoc gems. I don't think the documentation for my plugin for Nanoc is the right place to address it.