I might be missing something stupid.. but Passenger doesn''t like __END__ http://pastie.org/2689517 Same code (omitting requires) fine in Camping server, not with Passenger/Rack: compile error config.ru:33: syntax error, unexpected $end, expecting '')'' __END__ ^ Works fine under Passenger without __END__ - probably a Rack issue, but looking for clues here... Ruby 1.8.6 Rack 1.3.4 Passenger 3.0.9 Apache 2.2.17 Camping 2.1.467 DaveE BTW love @@/styles.css - saved 6 lines of code :-)
Try to split it up in two files: app.rb: The app config.ru: require ''app'' run Nuts I don''t think rackup-files can have __END__. // Magnus Holm On Thu, Oct 13, 2011 at 17:48, Dave Everitt <deveritt at innotts.co.uk> wrote:> I might be missing something stupid.. but Passenger doesn''t like __END__ > > http://pastie.org/2689517 > > Same code (omitting requires) fine in Camping server, not with > Passenger/Rack: > > compile error config.ru:33: syntax error, unexpected $end, expecting '')'' > __END__ ^ > > Works fine under Passenger without __END__ - probably a Rack issue, but > looking for clues here... > > Ruby 1.8.6 > Rack 1.3.4 > Passenger 3.0.9 > Apache 2.2.17 > Camping 2.1.467 > > DaveE > BTW love @@/styles.css - saved 6 lines of code :-) > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
On 13.10.2011 20:02, Magnus Holm wrote:> I don''t think rackup-files can have __END__.https://github.com/rack/rack/blob/master/test/builder/end.ru ? Matthias
2011/10/13 Matthias W?chter <matthias at waechter.wiz.at>:> On 13.10.2011 20:02, Magnus Holm wrote: >> >> I don''t think rackup-files can have __END__. > > https://github.com/rack/rack/blob/master/test/builder/end.ru > > ? MatthiasIt''s broken: https://github.com/rack/rack/pull/253 (it only handles one line of content)
On 13.10.2011 22:54, Magnus Holm wrote:> 2011/10/13 Matthias W?chter<matthias at waechter.wiz.at>: >> On 13.10.2011 20:02, Magnus Holm wrote: >>> >>> I don''t think rackup-files can have __END__. >> >> https://github.com/rack/rack/blob/master/test/builder/end.ru >> >> ? Matthias > > It''s broken: https://github.com/rack/rack/pull/253 (it only handles > one line of content)right. This will probably never work, though: [http://pastie.org/2693243] ? Matthias
> right. > > This will probably never work, though: [http://pastie.org/2693243] > > ? MatthiasWoah, I never realized that __END__ was valid on its own line inside a heredoc/string?
On 14.10.2011 09:20, Magnus Holm wrote:>> right. >> >> This will probably never work, though: [http://pastie.org/2693243] >> >> ? Matthias > > Woah, I never realized that __END__ was valid on its own line inside a > heredoc/string?and it?s valid within a multiline comment, too: =begin ? __END__ ? =end and this, again, is valid within a heredoc. Try: a = <<FIN bla =begin ble __END__ bli =end blo FIN All this regex .gsub! stuff breaks badly considering strings/files that require parsing instead. ? Matthias
On 14.10.2011 08:55, Matthias W?chter wrote:> This will probably never work, though: [http://pastie.org/2693243]I filed that as a Rack bug. Maybe it gets fixed someday. https://github.com/rack/rack/issues/254 ? Matthias
Thanks - that worked :-) - DaveE> Try to split it up in two files: > > app.rb: The app > > config.ru: > require ''app'' > run Nuts > > I don''t think rackup-files can have __END__. > > // Magnus Holm > > On Thu, Oct 13, 2011 at 17:48, Dave Everitt <deveritt at innotts.co.uk> > wrote: >> I might be missing something stupid.. but Passenger doesn''t like >> __END__ >> >> http://pastie.org/2689517 >> >> Same code (omitting requires) fine in Camping server, not with >> Passenger/Rack: >> >> compile error config.ru:33: syntax error, unexpected $end, >> expecting '')'' >> __END__ ^ >> >> Works fine under Passenger without __END__ - probably a Rack issue, >> but >> looking for clues here... >> >> Ruby 1.8.6 >> Rack 1.3.4 >> Passenger 3.0.9 >> Apache 2.2.17 >> Camping 2.1.467 >> >> DaveE >> BTW love @@/styles.css - saved 6 lines of code :-)