On Tue, Jan 5, 2010 at 10:51 AM, Marius Mårnes Mathiesen <[email protected]> wrote: > On Mon, Jan 4, 2010 at 3:18 PM, Benjamin Podszun > <[email protected]> wrote: >> >> On Mon, Jan 4, 2010 at 2:59 PM, Benjamin Podszun >> <[email protected]> wrote: >> So that _looks_ good, but again: It seems that this doesn't use the >> settings defined in environments/production.rb for me. I can see that >> boot.rb includes environment.rb as well. > > environment.rb is the file normally included/required in order to load the > Rails environment; boot.rb is loaded from this.
The other way around, no? boot.rb starts with # Configure your app in config/environment.rb and config/environments/*.rb and later defines a method "read_environment_rb" >> >> Possible ideas (can you shoot them down?): >> - boot.rb does something to the ActionMailer class (creating an >> instance that reads the configuration, whatever) >> - boot.rb predefines something that leads to the parsing of >> environments/production.rb > > My first suspicion would be that your RAILS_ENV doesn't get picked up by > script/poller; however requiring boot.rb shouldn't affect this. Does a git > diff show that this is the *only* change you made? In that case, does it > work if you require config/environment instead of config/boot? bpods...@tis-gitorious:/var/www/git.devtools/gitorious$ git diff script/poller diff --git a/script/poller b/script/poller index 9a4ee3f..7881cf1 100755 --- a/script/poller +++ b/script/poller @@ -8,6 +8,7 @@ else Encoding.default_external = Encoding::UTF_8 end +require File.dirname(__FILE__) + '/../config/boot' require 'rubygems' if RUBY_VERSION < '1.9' require 'daemons' I'm pretty sure I did that (including environment.rb) first (because I knew I touched the environment stuff and didn't even know that a boot.rb script exists or for what it is anyway) and it didn't work. I can test it again though, later today. Thanks for the help, Ben -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
