[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Consuming Ruby through COM?

Sam Smoot

4/20/2006 1:11:00 PM

We have a spread of ASP Classic (VBScript/JScript) websites that
desperately need some upgrading. We can't use Rails (for now, politics
around using something other than Windows and IIS), we (the developers)
don't want to use ASP.NET, we could live with Monorail, but we'd much
prefer Rails.

If we choose a .NET technology, we have a clear migration path since
there's a low chance of replacing the sites with new ones wholesale: We
can expose a .NET model through COM to the ASP Classic sites. After
enough of this, we'll have basically replaced the whole thing.

Is there a way to expose Ruby classes as COM objects to do the same?

What other integration options (besides WebServices under webrick,
which I'm assuming would be too slow/fragile) might there be to
accomplish this sort of ASP Classic/Ruby integration minus RoR?

19 Answers

Greg Chagnon

4/20/2006 5:13:00 PM

0


"Sam Smoot" <ssmoot@gmail.com> wrote in message
news:1145538638.315781.142400@e56g2000cwe.googlegroups.com...
> We have a spread of ASP Classic (VBScript/JScript) websites that
> desperately need some upgrading. We can't use Rails (for now, politics
> around using something other than Windows and IIS), we (the developers)
> don't want to use ASP.NET, we could live with Monorail, but we'd much
> prefer Rails.

Just setup Rails with IIS under windows:
http://wiki.rubyonrails.com/rails/pages/How...

Alternatively have a look at ActiveScriptRuby:
http://arton.hp.infos...



Sam Smoot

4/20/2006 7:22:00 PM

0

So ActiveScriptRuby is like ASP+Ruby? Kinda like ActiveState's Perl
stuff?

Sam Smoot

4/20/2006 8:22:00 PM

0

I don't know if my previous response went through, but thank you very
much for the pointer to ActiveScriptRuby. It looks perfect!

Took me awhile to figure out how to assign to Session and Application
values, but figured out the following syntax (since I couldn't find it
online):

Session['contents', 'test'] = 1
Response.write Session.contents('test')

You can also use:

Session.contents.test = 'something else'

But that only works if you've already set the key with the previous
syntax, so I'd probably avoid it entirely.

Sam Smoot

4/20/2006 9:05:00 PM

0

Actually, I'm sorry, should have looked first.

It seems that ActiveScriptRuby can be used as ASP+Ruby, but I can't
figure out how to assign values to Application or Session, even though
they're available, and I can view the methods using Session.ole_methods
and view the contents with:

Session.contents('test')

But the following doesn't work:

Session.contents('test') = 'moo'

Any tips? This would be _perfect_ for us.

Sam Smoot

4/20/2006 10:26:00 PM

0

COM error. :-(

I can use ActiveRecord for the first request, but after that I get a
HTTP500, and I get this error in my Windows Event Log (WinXP-Pro):

The application-specific permission settings do not grant Local
Activation permission for the COM Server application with CLSID
{0C0A3666-30C9-11D0-8F20-00805F2CD064}
to the user LOCAL\IWAM_WS25 SID
(S-1-5-21-823136628-2757595635-467206144-1017). This security
permission can be modified using the Component Services administrative
tool.

I went into the Component Services tool, right-clicked MyComputer,
added the Local Activation permissions (all four) to the specified
user, restarted the IIS pool, and restarted IIS itself, then tried
again, but same deal, same error. Any ideas?

Greg Chagnon

4/20/2006 10:30:00 PM

0


"Sam Smoot" <ssmoot@gmail.com> wrote in message
news:1145563541.078096.273130@g10g2000cwb.googlegroups.com...
> Actually, I'm sorry, should have looked first.
>
> It seems that ActiveScriptRuby can be used as ASP+Ruby, but I can't
> figure out how to assign values to Application or Session, even though
> they're available, and I can view the methods using Session.ole_methods
> and view the contents with:
>
> Session.contents('test')
>
> But the following doesn't work:
>
> Session.contents('test') = 'moo'
>
> Any tips? This would be _perfect_ for us.

To be honest I would try to go with a ruby web framework instead of going
with active script if you have the chance.

Nitro and Rails are both good options.


Sam Smoot

4/21/2006 12:05:00 AM

0

I agree, but the bosses are pushing ASP Classic for a new project. It's
enough to make a grown man cry. :-)

Still, a bit a Ruby splashed in might make it a bit more bearable.

Greg Chagnon

4/21/2006 2:02:00 PM

0


"Sam Smoot" <ssmoot@gmail.com> wrote in message
news:1145577926.900163.318930@v46g2000cwv.googlegroups.com...
>I agree, but the bosses are pushing ASP Classic for a new project. It's
> enough to make a grown man cry. :-)
>
> Still, a bit a Ruby splashed in might make it a bit more bearable.
>

Ahh well I did it for years :)

It's a nice starting point in learning web tech / programming.



Sam Smoot

4/21/2006 8:23:00 PM

0

So you've used ActiveScriptRuby on production sites then? It's
something I can depend on you think?

Or is it more of a cool toy, too flaky for "real" usage?

I'd much prefer Ruby over JScript, but it needs to be stable and all
that.

M?ta-MCI \(MVP\)

4/22/2006 11:35:00 AM

0

Hello!

*sorry for my bad 'BabelFished' english*

I produced a COM-server which makes it possible to call, publicly, of the
functions and the Ruby methods.
But:
- it is experimental,
- the COM-server is produced in Python,
- the call of Ruby uses active-scripting (ActiveRuby),
- the COM-server being dynamic, it makes it possible to apply a Ruby method
to a Python object. That is one more, compared to simple ActiveScripting
- afflicted, I tested only with Object-PAL and Python (and very small
test/call from Excel/VBA)
- that is now integrated in a larger project
- this message was translated with BabelFish.
- all comments, in the code, are in french
- I will show this realization at the Paradox-Convention, in Eindhoven, at
the end of May.

Lastly, I am complètre overflowed of work

@-salutations
--
Michel Claveau