开发者

Error when reading Outlook calendar from Rails application when started as a mongrel_service

I have recently implemented something in a rails application that allows me to read appointments of the Outlook calendar. This works sufficiently well. But when I tried to use it in production mode by starting it through mongrel_service, the whole thing stopped working and gave me the following error message:

failed to create WIN32OLE object from `Outlook.Application'
HRESULT error code:0x80080005
  Starten 开发者_运维问答des Servers fehlgeschlagen (german for: start of server failed)

So the problem seems to be the wrong account for the mongrel_service. Is it possible to configure it correctly?


Reading up on some forum posts, it seems that running your application in service mode will not be easy - or even feasible (for example have a look at: outlook and win32 service).

That being said, perhaps there are other ways to read calendar items from an Exchange server (assuming you are using Exchange), like for example using IMAP (Exchange calendar to Ruby object).


As a workaround, I have written the following script:

ruby script\runner 'AppointmentController.new.refresh_no_redirect'

I start this script regularly instead of using the button inside the Rails application. Because I start it by hand, my credentials are used and it works pretty well. So no solution for the original question, but one workaround that works well for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜