Hi all, I would like to use the Rails framework through scripts. Some of us like using browsers as an interface, but many of us prefer the command line. Does anyone know about writing Ruby scripts that can make use of the Rails framework to access the database, all from the command line? Thanks, - Derek -- Posted via http://www.ruby-forum.com/.
It''s pretty much built-in. Just use script/console. -Jonathan On 3/15/06, Derek <50m3guy@gmail.com> wrote:> > Hi all, > > I would like to use the Rails framework through scripts. Some of us > like using browsers as an interface, but many of us prefer the command > line. > > Does anyone know about writing Ruby scripts that can make use of the > Rails framework to access the database, all from the command line? > > Thanks, > - Derek-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060315/d8313088/attachment.html
Thanks, but I think I need to explain myself better. For example, I want to write a script, executable from the command line, that takes options from the user and performs the necessary database functions through Rails. If I want to edit a LineItem, let''s say, then this command line script would not be responsible for handling locking, validation, counts, relationships, etc. Instead, I want to have the Rails code do it. Is this the sort of thing to which you were referring? - Derek -- Posted via http://www.ruby-forum.com/.
You can use script/runner to execute a rails comand. -Jonathan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060315/4aa39605/attachment.html