From: Brian Candler Date: 2010-10-15T01:26:05+09:00 Subject: Re: Setting local variables for 'erb' command-line tool James Edward Gray II wrote in post #950195: > erb has a command-line switch to require a library. That library could > define top-level methods to serve as your local variables. Just a > thought. Thanks for that idea. What I'm doing for now is: erb -T - erb.conf src.erb where erb.conf contains local variable definitions: <% foo="bar" ... etc -%> This is working fine, except that any errors in src.erb are reported with an offset line number. e.g. templates/wrapper.sh.erb:41: warning: found = in conditional, should be == (error actually in line 26 of that file, and erb.conf is 15 lines long) Cheers, Brian. -- Posted via http://www.ruby-forum.com/.