2

I have the following line in my erb template:

SetEnv <%= name %> <%= value %>

The output from this line looks like this...

SetEnv SomeNameSomeValue

There is no whitespace between the name and value items. I want it to output this:

SetEnv SomeName SomeValue

I've found lots of articles explaining how to get erb files to strip unwanted whitespace, but I want the whitespace. How do I get the whitespace to stay in place?

Rik Heywood
  • 13,816
  • 9
  • 61
  • 81

1 Answers1

1

How about <%= "#{name} #{value}" %>?

Dan Healy
  • 747
  • 7
  • 13
  • That produced the same output (with no space). I must be missing something obvious, as this is making no sense at all now... – Rik Heywood Sep 23 '12 at 10:02
  • I was right - I was missing something obvious. My data was all screwed up. Now I've fixed my data my original code works correctly, and so does this answer. – Rik Heywood Sep 23 '12 at 14:51