Kind of an off the wall question but I want to use the config / load path [for models specifically] in an external app that essentially loads the database for my rails app [there''s transformations, processing involved, i.e. fixtures won''t help here] - it true DYI spirit, could anyone suggest a way to effectively use the models/config in a seperate script without having to restate them? I checked in the Rail Initializer but didn''t have much luck.. Thanks -- 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 -~----------~----~----~----~------~----~------~--~---
Michael Greenly
2007-Jan-10 12:22 UTC
Re: Using Rails config /load path/etc from external app..
Brez! !! wrote:> Kind of an off the wall question but I want to use the config / load > path [for models specifically] in an external app that essentially loads > the database for my rails app [there''s transformations, processing > involved, i.e. fixtures won''t help here] - it true DYI spirit, could > anyone suggest a way to effectively use the models/config in a seperate > script without having to restate them? I checked in the Rail Initializer > but didn''t have much luck.. > > Thanksscript/runner ''load "db/fill_user_table.rb"'' Normally script/runner just executes the code passed to it, pass it a file to execute. I think this will work. -- 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 -~----------~----~----~----~------~----~------~--~---
> > script/runner ''load "db/fill_user_table.rb"'' > > Normally script/runner just executes the code passed to it, pass it a > file to execute. I think this will work.Works like a charm - thanks.. -- 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 -~----------~----~----~----~------~----~------~--~---