Hi, I wanted to set port in config file (via mongrel_rails -C config/config.yaml), and it seems to not take it into account. I''ve looked into the code, (line 58), and it reads: settings = conf.merge(settings) Now settings contain all the possible (important) keys (possibly with nil values, line 49, and lib/mongrel/command.rb, line 46) so everything from conf get overwritten with settings'' content. Therefore, I think line 58 has no effect. My question is: Is this really a bug or am I missing something? (i''m using 1.3.12.4-mswin32) Jano
On Wed, 2006-06-07 at 21:34 +0200, Jan Svitok wrote:> Hi, > > I wanted to set port in config file (via mongrel_rails -C > config/config.yaml), and it seems to not take it into account. > > I''ve looked into the code, (line 58), and it reads: > settings = conf.merge(settings) > > Now settings contain all the possible (important) keys (possibly with > nil values, line 49, and lib/mongrel/command.rb, line 46) so > everything from conf get overwritten with settings'' content. > > Therefore, I think line 58 has no effect. > > My question is: Is this really a bug or am I missing something? > > (i''m using 1.3.12.4-mswin32)I''ll be damned, that''s been backwards this whole time and nobody noticed? That''s just disgusting. I''ll fix it right now and update the pre-release. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/
On Wed, 2006-06-07 at 21:34 +0200, Jan Svitok wrote:> Hi, > > I wanted to set port in config file (via mongrel_rails -C > config/config.yaml), and it seems to not take it into account. >Ok, this should be quickly fixed in the latest pre-release, so please grab it with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ And let me know how it works for you. One change is that I went with the config file overriding everything that you set. This turns out to be a lot easier to implement, but people should let me know if they find this weird. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/
I''ve tried it and it works fine. I''ve thought about a more proper handling, but I''ve to conclusion that it''s not worth the trouble ;-) I''d let it as it is. It would be a different case when there was a default config file. Then, command-line switches should override the config file. J.> And let me know how it works for you. One change is that I went with > the config file overriding everything that you set. This turns out to > be a lot easier to implement, but people should let me know if they find > this weird.