Displaying 20 results from an estimated 200000 matches similar to: "Environment Setting"
2006 Oct 14
1
Setting environment
Not sure this is known behaviour but it seems that if want to set the
environment to, for example, test, and you want to use Active Record you
have to both explicitly set the RAILS_ENV and the BackgrounDRb environment.
So, if you have a config file backgroundrb_test.yml (as well as the
default) and set the environment to test in that, this is what *seems*
to happen:
$
2007 May 04
1
Setting environment
> Chris T wrote:
> > Not sure this is known behaviour but it seems that if want to set
> the
> > environment to, for example, test, and you want to use Active
> Record you
> > have to both explicitly set the RAILS_ENV and the BackgrounDRb
> environment.
>
> I ran into essentially the same problem (needing to run BRB in the
> test
> environment so
2007 Jul 11
1
plugin not loading for model? (acts_as_ferret)
Hi all,
I''m using the older win32 happy backgroundrb in combination with the
''acts_as_ferret'' install as a plugin.
Since I''ve installed acts_as_ferret, I haven''t been able to get
backgroundrb to start. It keeps failing at the ''acts_as_ferret'' method
call in one of my models.
Here''s a code snippet of the model:
class Book
2006 Nov 27
1
rails environment loaded but one plugin is undefined (using backgroundrb 0.2.0)
Hello all,
I''m using BackgroundRb 0.2.0 (standalone) and in the do_work method of
my worker, I''m working with objects from my Rails application. So in my
config/backgroundrb.yml file, I added this line:
:load_rails: true
I think my worker isn''t doing what I want him to do. So I opened the
console and read these error lines:
# ruby script/backgroundrb console
2008 Apr 02
1
Specifying environment in backgroundrb.yml
It seems that regardless of what environment I specify in my
backgroundrb.yml file, it always uses development mode unless I pass
"-e production" to the "script/backgroundrb start" command.
>From looking at bdrb_config.rb, it looks like immediately after
loading the config file it assigns whatever was passed on the command
line (which defaults to development if nothing is
2006 Oct 30
1
new BackgroundRB
Hey Greg-
Yes I am sorry, the new architecture uses fork and named pipes and a
bunch of unix stuff to do its magick. Now you may be able to port it
to qwork on windows, but I don''t think it is possible :( I''m really
sorry about this but I need this thing to be as robust and solid as
it can be and in the end windows isn''t compatible. Now you may be
able to
2007 Jan 30
1
Logging doesn''t work
Sorry for perhaps asking a Newbie-Question, but couldn''t find any answer
elsewhere (and even not in the archieves...).
Trying to import files in my rails app using backgroundrb and trying to
examine the backgroundrb.log file. But it isn''t updated. The pid-file is
updated to the correct value every time I start drb. I''m working on an
windows-machine (XP Prof).
Tried to
2008 Nov 11
1
attachment_fu, aws-s3 and backgroundrb
Hi,
I''m using attachment_fu to store files on amazon s3. A background job is currently performing the upload and I''m having a strange issue where the very first file uploaded/created (attachment_fu uploads when creating the object) does not get uploaded. The db information is all all good. The model and attachment model associated with it are saved to the db, but the file is
2008 Apr 11
3
does backgroundrb server need rails environment?
Hi everyone,
I noticed that script/backgroudrb requires config/environment which
causes the backgroundrb server as well as the log worker to ''bloat'' to
35MB each. I am kind of sensitive to memory issues, so I patched the
code and essentially moved the require of environment from
script/backgroundrb to the meta_worker. Everything seems good and now
both backgroundrb server and
2007 Dec 27
4
Lost connection..
Short update:
It seems that the workers go into some state in which they do not have a
correct Rails environment (or db connection). When they enter this state
it goes wrong all the time :(
Joost Hietbrink (YelloYello) wrote:
> Hi all,
>
> We''re experiencing some problems with Backgroundrb.
>
> Why is "# master_reactor_instance.result_hash = {}" commented in
2006 Aug 29
1
Tasks get executed twice with repeat_every
I have a simple worker that I set up with repeat_every:
class DueNoteQueuerWorker < BackgrounDRb::Rails
repeat_every 1.minutes
first_run Time.now
def do_work(args)
@logger.debug("Sending due notes. The current time is #{Time.now}")
end
end
I want this to run every minute, all the time. The first run is fine,
but it seems that subsequent runs get executed
2006 Jul 22
3
test:plugins task dependency on :environment is pointless, surely?
Hello all,
I''ve been doing quite a bit of rooting around the plugin system
recently, and one thing in particularly has me puzzled and bemused. At
the moment, the test:plugins task has a dependency on the :environment
task, thus loading up Rails in all it''s resplendent glory. Once it''s
done this it uses Rake::TestTask to load the tests for every plugin.
However, because
2006 Jul 31
1
Starting backgroundrb from rails and restarting with rails
Hi,
I have my rails sites tricked out with capistrano, and backgroundrb, so
I can easily use the ant tasks, but I would like to be able to start and
stop backgroundrb from within rails.
I have a few reasons for this:
1. Using fastcgi, backgroundrb would start under the apache user and the
same mod_security context as apache, instead of my developer account
which has many more privileges.
2.
2007 Feb 21
0
accessing controller methods from backgreoundrb
Hi all,
I am trying to use backgroundrb to cache a set of controller actions
that are quite processor expensive (there is some pretty heavy xml
processing going on). In my rails app I have page caching set up to
observe the appropriate controllers and models and all works well.
However when model changes occur in a backgroundrb process the cache
sweeper isn''t notified of the changes
2008 May 29
0
How to know the environment (development/test/production) inside a worker - FIXED
Hi Guys,Looks like I have to do this in backgroundrb.yml
:backgroundrb:
:ip: 0.0.0.0
:production:
:backgroundrb:
:port: 11008 # use port 11008
:environment: production
That is, have an entry for "environment: production" under :production:,
This seems to have fixed the issue.
Regards
Sarat
On 5/29/08, Sarat Kongara <saratkongara at gmail.com> wrote:
>
>
2007 Apr 23
0
Using mapped database connections
This morning I switched over my backgroundrb server from development
mode to production mode. After that all I was getting was errors when
attempting to connect to the backgroundrb server. I checked the
backgroundrb_server.log file and noticed the following exception
20070423-10:30:00 (29673) development database is not configured -
(ActiveRecord::AdapterNotSpecified)
In my database.yml
2008 Sep 21
3
Monit; BackgroundRB; environment variables
I started emailing monit mailing list because I started getting this
problem where I couldn''t start backgroundrb with monit anymore,
thinking it was a monit problem. However, I back tracked a bit since
I had added code to my project, and monit was able to start
backgroundrb again.
I seem to have zeroed in on the problem. I''m not sure where the
problem lies - maybe monit or
2007 Dec 13
1
Possible Bug & Question
Hi there,
Amazing changes! I really like what you''ve done with BackgrounDRb and I hope
you continue developing it, since it was definitely somewhat languishing
before.
One small error stuck out for me, though. The create method requires an
argument even if one isn''t used, such that if you have:
def create
@results = Hash.new
end
The server throws an error about trying to
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
Hi,
it probably is a noob question but I''m confused by this error message:
active_support/dependencies.rb:478:in `const_missing'': uninitialized
constant Invoice::ApplicationController
Situation:
I have an InvoicesController with a create method that in turn calls
upon a MiddleMan.worker(:billing_worker), which in turn finds an Invoice
and calls upon @invoice.print_invoice
2006 Sep 06
4
Setting Product Env
When I am using my rails models in my worker class, it appears the
background worker class is always using development no matter what I do.
I set background.yml to production. I even have ENV[''RAILS_ENV''] ||=
''production uncommented in environment.rb. I don''t have the development
db even created on my production box, so not sure where it is getting
development