Hi Luis,

On Sun, 15 Nov 2009 23:32:02 +0100, Luis Lavena <luislav...@gmail.com> wrote:

On Sun, Nov 15, 2009 at 9:21 AM, Markus Liebelt <mlieb...@web.de> wrote:
Hi everybody,

I try to use in a rails application that is installed with mongrel_service
on windows the win32ole API to access Outlook appointments. This works
well when started from the command line, but does not work when started as
a service.

What should I check in which order to trap down the error?

Hello Markus,

Services run without privileges for certain things, like create
objects and such.

Since you're executing from the command line and work, means that your
user has access to these OLE objects.

There are two options:

1) Configure the service to run under the same user account (that can
be done from the services management interface)

I just tried that. See my question on Stackoverflow (http://stackoverflow.com/questions/1737135/error-when-reading-outlook-calendar-from-rails-application-when-started-as-a-mong) and the hint of Mr. Doggen that this may not work with Outlook.

I have tested it again with the correct user account and it did not work either. So I found the workaround:

Start a small script like

ruby script\runner 'AppointmentController.new.refresh_no_redirect'

2) Determine the issue using psexec.

Try to lower the privileges of the prompt and execute the exact same
command line.

The tools you need are psexec, as I mentioned here:


See that thread for details.

I did not tried that, thank's anyway for the recommendation.

Please also include in your reply information about your OS (32bits or
64bits), versions of Ruby and the gems installed too.

Well, I don't think that they matter here. I use Windows XP (32bit), ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

There is a known issue with 64bits Windows that was solved in latest
gem release, just in case.


Thank's a lot for your hints.

Mongrel-users mailing list

Reply via email to