On Friday, September 1, 2017 at 7:31:14 PM UTC+1, Hassan Schroeder wrote:
>
> On Fri, Sep 1, 2017 at 11:00 AM, Ben Edwards <[email protected] 
> <javascript:>> wrote: 
>
> > So I take it I need to run this from the rails app directory? Where 
> should I 
> > put the scripts, vendor maybe? 
>
> I normally put them in the /lib directory. 
>

Yes, that was what I thought (after a bit more googling).  Would it be OK 
to create a scripts directory under lib to put the ,rb scripts in.   Also  
I have a module, so I guess I should put this in lib/modulename·

Now a bit of context is probably needed.  I will have quite a lot of 
scripts (possibly 40, each one is a web scraper).  They do very gentle 
scraping (i.e. a http request every 15 seconds) so currently I run them 
concurrently using cron.  Doing this all within rails seems a great idea 
but I am worried about the (resource) cost of doing this (initializing 40 
rails environments) will be quite high.  Did some googeling and could not 
find out what the cost is.  Don't want to put undue stress on the server so 
although I like the ideal it may be better to keep them as separate stand 
alone scripts outside rails.  Like I said I would rather run them inside 
rails.  What so you think?  

>
> -- 
> Hassan Schroeder ------------------------ [email protected] 
> <javascript:> 
> twitter: @hassan 
> Consulting Availability : Silicon Valley or remote 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/322c3558-f4fc-4780-baf1-ef3390eddc7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to