When I (and a couple colleagues) run "html2haml --help" on the command line with any 3.x gem, we get the following error:
NoMethodError: undefined method `[]' for nil:NilClass Use --trace for backtrace. When we run "html2haml --trace --help" we get something like this: /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/gems/ haml-3.1.0.alpha.147/bin/../lib/haml/exec.rb:135:in `puts': undefined method `[]' for nil:NilClass (NoMethodError) from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/gems/ haml-3.1.0.alpha.147/bin/../lib/haml/exec.rb:87:in `set_opts' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1267:in `call' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1267:in `parse_in_order' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1254:in `catch' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1254:in `parse_in_order' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1248:in `order!' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1339:in `permute!' from /Users/timh/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/ optparse.rb:1360:in `parse!' from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/gems/ haml-3.1.0.alpha.147/bin/../lib/haml/exec.rb:39:in `parse' from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/gems/ haml-3.1.0.alpha.147/bin/../lib/haml/exec.rb:21:in `parse!' from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/gems/ haml-3.1.0.alpha.147/bin/html2haml:7 from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/bin/ html2haml:19:in `load' from /Users/timh/.rvm/gems/ree-1.8.7-2011.03@myproject/bin/ html2haml:19 I poked around in the code a bit, and it looks like the problem is that @options[:for_engine] isn't being initialized as an empty Hash, as expected by the line that fails. This is probably an inheritance issue. Html2Haml is a child of the Generic class, but @options[:for_engine] is initialized in the HamlSass class (../lib/ haml/exec.rb:184), also a child of Generic. Since Html2Haml doesn't inherit from HamlSass, the :for_engine key is never initialized. If I should report the issue somewhere else, let me know. Thanks, Tim -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to haml@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.