Hi, I have a compiled c program I use to do text processing. It operates as a pipe: cat sometext.txt | /usr/local/bin/my_c_program > othertext.txt I want to use it to process text which is typed into a textarea field in an HTML form. What are some options I have to make use of this executable so I could use it as a text filter inside of Rails? -Dan --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 9/30/06, Dan Bikle <dan.bikle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > I have a compiled c program I use to do text processing. > > It operates as a pipe: > > cat sometext.txt | /usr/local/bin/my_c_program > othertext.txt > > I want to use it to process text which is typed into > a textarea field in an HTML form. > > What are some options I have to make use of this > executable so I could use it as a text filter inside > of Rails?Try Kernel#popen [http://corelib.rubyonrails.org/classes/IO.html#M001289]. -ryan --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jason Frankovitz
2006-Oct-01 17:56 UTC
fixtures - rake db:data:dump doesn''t generate valid YML
I''m writing tests and want to move my development data into my test db. I do a "rake db:data:dump MODEL=My_modelname" and get a fixtures file that looks like this: -- - !ruby/object:My_modelname attributes: name: nil notes: id: "1" state: - !ruby/object:My_modelname attributes: name: rdfadd notes: id: "2" state: . . . etc This format is rejected by the fixtures() method. To get it to work I have to take four (!) manual steps: - erase the leading "--" line - erase the "- !ruby/object:My_modelname" lines - erase the leading double-space before "attributes" - give each fixture record a unique name So when I''m done it looks like this: rec_1: name: nil notes: id: "1" state: rec_2: name: rdfadd notes: id: "2" state: I thought the whole point was the the dump makes YML files that can go straight into testing? Am I doing something wrong? Thanks! -Jason --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- [ Rails ] Multiple rails apps on 1 host
- Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
- PostgreSQL, postgres gem, rails2.pdf, http://ruby.scripting.ca/postgres/ confusion...
- How I provide a session object to Functional Tests?
- SaltedHashLoginGenerator no such file to load -- iconv