Mongrel service

Hi all

Environment:

Windows 7 64 bit

Ruby 1.9.2.p0

Rails 3

I am getting the following error when I run the following command
mongrel_rails service::install -N MyTestApp_4001 -p 4001 -e production:

“Msvcrt-ruby18.dll is missing”

Thanks in advance

Gerhard

On Wed, Sep 22, 2010 at 9:33 AM, Gerhard Koekemoer
[email protected] wrote:

Hi all

You’re attempting to run Ruby 1.9 with a version of mongrel that
hasn’t been compiled with Ruby 1.9 support.

Please install the 1.2.0 prerelease version:

gem install mongrel --pre

Also note that “mongrel_rails start” will fail with Rails 3. Which
means mongrel service will also fail. Before you report that back, see
existing issues in relation to Rails 3:

http://github.com/fauna/mongrel/issues

Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Hi Luis

Thanks for the info.

The reason that I went for mongrel 1.1.5 is that the mongrel_service
0.4.2.beta3 gem requires it.

If I understand you correctly:

  1. Because we are runnig ruby 1.9.2 we should run mongrel 1.2.0.pre
    which
    does not play nicely with mongrel service (I get an error asking for
    1.1.5).

  2. The best solution would be to run 1.8.7 with mongrel 1.1.5 and
    mongrel_service 0.4.3.beta3

Regards,

Gerhard

Hi Luis

I have now switched over to Ruby 1.8.7 and Mongrel 1.1.5 and Mongrel
Service
0.4.3.beta3 just to make sure these gems are compatible with each other.

Running the mongrel_rails start command: “mongrel_rails is not
recognized as
an internal or external command”, is this the error you spoke about?

Basically, it seems that there just isn’t any way at all of running
mongrel
as a service with Rails 3. Could you confirm this?

On Wed, Sep 22, 2010 at 11:12 AM, Gerhard Koekemoer
[email protected] wrote:

Hi Luis

I have now switched over to Ruby 1.8.7 and Mongrel 1.1.5 and Mongrel Service
0.4.3.beta3 just to make sure these gems are compatible with each other.

Running the mongrel_rails start command: “mongrel_rails is not recognized as
an internal or external command”, is this the error you spoke about?

No. Is Ruby in your PATH?

Basically, it seems that there just isn’t any way at all of running mongrel
as a service with Rails 3. Could you confirm this?

Correct. Noone has worked on fix that.

Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Hi Luis,
I am trying to set up mongrel service on windows XP using Rails 2.3.2
and mongrel 1.1.5.
I manage to run my app as windows services but I am unable to go further
with option such as -l, -P, or -C work.
I tried -l and give full log file path but there’s no log file.
I tried -P but I don’t see a pid file on the folder I specified.
I tried to do -p 4100+3 but unable to have the service run for port
4100, 4101 and 4102.
I also would like to use -C so that I can use a yml config file but I
did not see any documentation of how to configure it.
I am familiar with mongrel_cluster in linux but I wish I could get this
working on windows machine as well.
I’ve read some of your post and indeed it helped me to get this far.
Please give me some light?

My question is are we suppose to see a pid file in windows?
and
how are we allow the service to run multiple port like
-p 3000+3 ?

Here are my notes:

Prerequisites:

upgrade ruby gems (gem update --system)
verify that the currently installed version of mongrel is 1.1.5 or later
and
if it isn’t:
uninstall mongrel (gem uninstall mongrel)
install mongrel (gem install mongrel)
verify that the currently installed version of mongrel_service is
0.4.beta3
or later and if it isn’t:
uninstall mongrel_service (gem uninstall mongrel_service)
install mongrel_service (gem install mongrel_service)
use gem list and verify that the mongrel_service installed is 0.4 or
later.
If it isn’t, you need to take these extra steps:
uninstall mongrel_service (gem uninstall mongrel_service)
install mongrel_service 0.4.beta3 (gem install mongrel_service --pre)
verify that the correct mongrel service has been installed by typing
mongrel_service at the dos prompt. Which should produce output like:
Mongrel Windows Service, version 0.4.beta2
© 2006-2010 The Mongrel development team.

mongrel_service is not designed to run form commandline,
please use mongrel_rails service:: commands to create a win32 service.

If the version is less than 0.4.beta2, you need to manually copy the new
mongrel_service.exe. On my system, Ruby is installed in C:\Ruby and I
would
have to copy the file:

C:\Ruby\lib\ruby\gems\1.8\gems\mongrel_service-0.4.beta3\resources\mongrel_s
ervice.exe
to folder:
C:\Ruby\bin

Finally, navigate to the folder holding the RoR application and invoke
these
commands to uninstall/install the service:

mongrel_rails service::remove -N APALSvc

mongrel_rails service::install -N APALSvc -D “AutoPallet/AutoLoader
Service”
-c “D:/Development/APAL6/APALUI” -e production -p 3035 --log
log/mongrel.log

Cheers
Pete

On Tue, Feb 1, 2011 at 4:22 PM, Edison T. [email protected]
wrote:

My question is are we suppose to see a pid file in windows?
and

pid files are not created on Windows.

how are we allow the service to run multiple port like
-p 3000+3 ?

You need to create multiple services at different ports.

Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry

On Tue, Feb 1, 2011 at 5:35 PM, Edison T. [email protected]
wrote:

My next questions is instead of creating multiple services, is there an
option to allow one service run multiple ports. Something like creating
a script file trigger all the ports when one service start?
What is the best practice? Thanks!! =)

No, right now there isn’t.

mongrel_service was designed behind that goal, but the code that
powers that part is missing.

(single mode is the only mode available in the current codebase)


Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry

Luis L. wrote in post #943008:

Basically, it seems that there just isn’t any way at all of running mongrel
as a service with Rails 3. Could you confirm this?

Correct. Noone has worked on fix that.

Luis L.

Is this still correct?

thanks, Anita

Yes, still correct.

Sent from mobile.
On Mar 23, 2011 4:57 AM, “Anita G.” [email protected] wrote:

Luis L. wrote in post #943008:

Basically, it seems that there just isn’t any way at all of running
mongrel

Great, Thanks for confirmation!
I’ve been confused by -d (daemon mode) -N (# of servers) parameter. I
guess those won’t work in Windows. Some post gives me the impression
that pid file exist in windows so I keep trying.
My next questions is instead of creating multiple services, is there an
option to allow one service run multiple ports. Something like creating
a script file trigger all the ports when one service start?
What is the best practice? Thanks!! =)