> Is there an easy way I can write an independent script that gets the
> rails environment the way console does etc ? I've never seen this
> except through like backgroundrb etc

You could create say lib/foo.rb and within that have say:

class Foo
   def self.bar
     # do whatever you want to do and have access to all your models,  
etc.
   end
end

And run it with "./script/runner Foo.bar"

You could also do it as a rake task and have rake load up the  
environment...

-philip

--~--~---------~--~----~------------~-------~--~----~
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