Hassan Schroeder wrote:

> They don't line up in this email, either :-)
...hehe....I know, I'm sorry that wasn't much of a help :-)

> Are you trying to display this in PRE tags or equivalent CSS with a
> monospace font?

..good call on this one though, I added PRE tags on my index.rhtml and 
the data is looking the way I want it...which is great news.

I am still a bit baffled as to why I have to write the data to a file 
first, then open the file and put it in PRE tags as opposed to using 
PUTS statements in my original script and assigning that to a variable 
which gets called by my index page which still causes the format to be 
skewed.
---
my_data.rb code:
data.each do |line|
   a.write(line) #--this writes to my_data.dat
   puts line     #--this puts the same data to STDOUT
end
---
controller code:
def index
   @my_data = `/usr/bin/my_data.rb`   #this causes data to be skewed
   [EMAIL PROTECTED] = File.open("/usr/bin/my_data.dat").read #this works
end
---
index.rthml code:
<pre><%= simple_format @my_data %></pre>

Perhaps the way I'm writing to STDOUT in my_data.rb is causing the 
skewing of my data?

thanks

vic




-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to