write file in binary mode, this was failing for me on ruby 1.9.3. 
fix encoding issue for ruby19 (was still failing for me...)
even bundler didn't start, it complained about the gemspec... guess it is this: 
nanoc “compiles”