Wolf
2018-07-31 13:57:55 UTC
Hi,
I would love to use __END__ / DATA in my .erb file (executed
via `erb file.erb`. I've tried
<html>
<head />
<body>
<%= DATA %>
</body>
</html>
<%
__END__
foobar
but that does not work
Traceback (most recent call last):
5: from /usr/bin/erb:170:in `<main>'
4: from /usr/bin/erb:149:in `run'
3: from /usr/lib/ruby/2.5.0/erb.rb:858:in `run'
2: from /usr/lib/ruby/2.5.0/erb.rb:876:in `result'
1: from /usr/lib/ruby/2.5.0/erb.rb:876:in `eval'
genki.html.erb:4023:in `<main>': uninitialized constant DATA (NameError)
Is it possible to do this somehow?
W.
I would love to use __END__ / DATA in my .erb file (executed
via `erb file.erb`. I've tried
<html>
<head />
<body>
<%= DATA %>
</body>
</html>
<%
__END__
foobar
but that does not work
Traceback (most recent call last):
5: from /usr/bin/erb:170:in `<main>'
4: from /usr/bin/erb:149:in `run'
3: from /usr/lib/ruby/2.5.0/erb.rb:858:in `run'
2: from /usr/lib/ruby/2.5.0/erb.rb:876:in `result'
1: from /usr/lib/ruby/2.5.0/erb.rb:876:in `eval'
genki.html.erb:4023:in `<main>': uninitialized constant DATA (NameError)
Is it possible to do this somehow?
W.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.