avdgaag / nanoc-template

A simple template project for websites built with Nanoc

Home Page:http://github.com/avdgaag/nanoc-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:173:in `resolution_for'
  2. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:76:in `print_error'
  3. 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'
  4. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:34:in `handle_while'
  5. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
  6. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/command.rb:50:in `call'
  7. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/command.rb:43:in `call'
  8. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/commands/compile.rb:24:in `block in define'
  9. C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:255:in `call'
  10. C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:255:in `run'
  11. C:/Ruby192/lib/ruby/gems/1.9.1/gems/cri-2.0.2/lib/cri/command.rb:272:in `run'
  12. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli.rb:40:in `block in run'
  13. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:42:in `handle_while'
  14. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
  15. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/lib/nanoc3/cli.rb:37:in `run'
  16. C:/Ruby192/lib/ruby/gems/1.9.1/gems/nanoc3-3.2.2/bin/nanoc3:12:in `<top (required)>'
  17. C:/Ruby192/bin/nanoc3:19:in `load'
  18. 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.