Hi,

And you're running your script with ruby script.rb ?

1 - Write a custom environment 'myenv' (optional)
2 - run your script with merb -r scriptname.rb -e myenv

This will give your script access to the specified merb environment.

Additionally, you can also write a custom init file which loads the stuff
that you need, and excludes the stuff that you don't need (router, mailers),
and run it with: merb -r scriptname.rb -e myenv -I mycustominit.rb

Hope that helps,

Ahsan / highandwild

On Tue, Jan 6, 2009 at 9:45 AM, camb <[email protected]> wrote:

>
> Does anyone know how I have merb running as a web service, and also
> have another script that loads the environment(models mainly). I'm
> doing some background processing with starling, but am struggling to
> have the web server not effect the starling processor. Currently I'm
> using
>
> Merb.start_environment(:testing => false, :adapter =>
> 'runner', :environment => ENV['MERB_ENV'] || 'development')
>
> which is ripped from spec_helper.rb. But this, a. Seems like overkill,
> when all I want is DB access & the models and b. The web server
> crashing brings this down and vice vesa. Which I really don't want.
>
> Any ideas?
>
> Thanks,
> camb
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to