Thomas Mann
2007-Jul-14 14:02 UTC
newbi: Save console commands as script (e.g. rake task?)
Hello, I am new to ruby but I am already with love with the console. What I am looking for is a way, to write a parser that reads a text file and creates database entries from it. Something like: for line in lines p= Product.new p.name=line p.save end -- 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 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?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- expiring cache outside controller (e.g. in rake tasks)
- Rake task vs script/runner
- Script acting differently inside of rake task
- 3rdrail run rake task error: no Ruby script found in input (LoadError) (Windows)
- anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)