[Mongrel] Mongrel_Cluster PID File Creation Error.

donnie at darthik.com donnie at darthik.com
Wed Feb 21 15:04:00 EST 2007


Hello Bradley,

Excellent, glad I was of some assistance.  :)
It does look like File.basename would be more consistent and less
error-prone. 
__
Donnie

Bradley Taylor wrote:
> Hi Donnie:
>
> Thanks for raising this issue and the patch. Locally, I've patched it 
> using ruby's File.basename and it seems to work for your use case and 
> supports other file extensions.
>
> I'm working on another prerelease now.
>
> Regards,
> Bradley Taylor
>
> donnie at darthik.com wrote:
>   
>> Hello,
>>
>> Thank you for your development of Mongrel, great job.  :)
>>
>> I am using mongrel_cluster, but I have a problem where my rails
>> application name includes a "." such as mydomain.com, which causes an
>> error when generating the PID file for mongrel.
>>
>> I have attached below a diff of the current working copy in the trunk
>> and the changes I made to overcome this problem.  I kept your convention
>> of assuming the file ends with ".pid" in my changes.
>>
>> Hope this helps.
>> __
>> Donnie Jones
>>
>>
>>
>> svn diff
>> Index: init.rb
>> ===================================================================
>> --- init.rb     (revision 519)
>> +++ init.rb     (working copy)
>> @@ -24,7 +24,7 @@
>>          }
>>          conf = YAML.load_file(@config_file)
>>          @options.merge! conf if conf
>> -        @pid_file = @options["pid_file"].split(".")
>> +        @pid_file = @options["pid_file"].split(".pid")
>>
>>          start_port = end_port = @only
>>          start_port ||=  @options["port"].to_i
>> @@ -34,7 +34,7 @@
>>        end
>>
>>        def port_pid_file(port)
>> -        "#{@pid_file[0]}.#{port}.#{@pid_file[1]}"
>> +                               "#{@pid_file}.#{port}.pid"
>>        end
>>
>>        def start
>>
>>
>> _______________________________________________
>> Mongrel-users mailing list
>> Mongrel-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/mongrel-users
>>     
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>   


More information about the Mongrel-users mailing list