[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Compile Ruby9i on Windows

Bertram Scharpf

1/14/2006 4:38:00 PM

Hi,

in my company we use Oracle and Windows :-(.

Now, I would like at least to start for some quick-and-dirty
solutions to use Ruby. Maybe my boss could be convinced it's
worth a closer look.

I'm afraid, I don't succeed to compile the
<http://ruby9i.sourceforg... library at all. I get loads
of errors the more I try. I easily managed to compile my own
OCI (Oracle from C) programs with MSVC (by the way: C
plugins, too).

I would build a project file of my own but as I see the Ruby
installation includes ".so" files. I don't know what
restrictions to use to build DLLs that can be renamed to
that type.

Could anyone please give me a short description of what is
to do?

Thanks in advance,

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...


5 Answers

Daniel Berger

1/14/2006 4:54:00 PM

0

Bertram Scharpf wrote:
> Hi,
>
> in my company we use Oracle and Windows :-(.
>
> Now, I would like at least to start for some quick-and-dirty
> solutions to use Ruby. Maybe my boss could be convinced it's
> worth a closer look.
>
> I'm afraid, I don't succeed to compile the
> <http://ruby9i.sourceforg... library at all. I get loads
> of errors the more I try. I easily managed to compile my own
> OCI (Oracle from C) programs with MSVC (by the way: C
> plugins, too).
>
> I would build a project file of my own but as I see the Ruby
> installation includes ".so" files. I don't know what
> restrictions to use to build DLLs that can be renamed to
> that type.
>
> Could anyone please give me a short description of what is
> to do?
>
> Thanks in advance,
>
> Bertram

I recommend using OCI8 instead of ruby9i. The ruby9i is not
maintained. The OCI8 library *is* maintained and has a pure ruby
version you can use.

Regards,

Dan

David Vallner

1/14/2006 7:06:00 PM

0

On Sat, 14 Jan 2006 17:38:19 +0100, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:

> Hi,
>
> in my company we use Oracle and Windows :-(.
>
> Now, I would like at least to start for some quick-and-dirty
> solutions to use Ruby. Maybe my boss could be convinced it's
> worth a closer look.
>
> I'm afraid, I don't succeed to compile the
> <http://ruby9i.sourceforg... library at all. I get loads
> of errors the more I try. I easily managed to compile my own
> OCI (Oracle from C) programs with MSVC (by the way: C
> plugins, too).
>
> I would build a project file of my own but as I see the Ruby
> installation includes ".so" files. I don't know what
> restrictions to use to build DLLs that can be renamed to
> that type.
>
> Could anyone please give me a short description of what is
> to do?
>
> Thanks in advance,
>
> Bertram
>
>


A .so is a .dll. They're compiled basically the same way, just remember to
export the Init_* functions. (Or for qnd jobs, export all functions, you
can always optimize later). If you have the time, you might want to give
the file "rbconfig.rb" a read, pretty much everything the extension
configuration scripts use is there.

Also, a little bit of POSIX goes a long way. A lot of Makefile generators
count on you using a sh-compatible shell, POSIX CLI tools, and gcc
compiler flags. You might try switching to a cygwin or mingw build of ruby
if you plan to use extensions a lot.

David Vallner


Wilson Bilkovich

1/15/2006 11:45:00 PM

0

On 1/14/06, Bertram Scharpf <lists@bertram-scharpf.de> wrote:
> Hi,
>
> in my company we use Oracle and Windows :-(.
>
> Now, I would like at least to start for some quick-and-dirty
> solutions to use Ruby. Maybe my boss could be convinced it's
> worth a closer look.
>
> I'm afraid, I don't succeed to compile the
> <http://ruby9i.sourceforg... library at all. I get loads
> of errors the more I try. I easily managed to compile my own
> OCI (Oracle from C) programs with MSVC (by the way: C
> plugins, too).
>
> I would build a project file of my own but as I see the Ruby
> installation includes ".so" files. I don't know what
> restrictions to use to build DLLs that can be renamed to
> that type.
>
> Could anyone please give me a short description of what is
> to do?
>
> Thanks in advance,
>
> Bertram
>
I only tried to make Ruby9i work for a short time, before deciding
that the Ruby-oci8 interface was more recently maintained, and more
popular:
http://www.jiubao.org/...
I'm using this (on Windows and otherwise) for a number of production
tasks and Rails systems, and it works well. Conveniently, it also has
a binary download for Windows, so you won't need to compile anything.


Bertram Scharpf

1/16/2006 6:19:00 PM

0

Hi,

Am Sonntag, 15. Jan 2006, 04:05:56 +0900 schrieb David Vallner:
> On Sat, 14 Jan 2006 17:38:19 +0100, Bertram Scharpf
> <lists@bertram-scharpf.de> wrote:
>
> >in my company we use Oracle and Windows :-(.
> >
> >I'm afraid, I don't succeed to compile the
> ><http://ruby9i.sourceforg... library at all. I get loads
> >of errors the more I try. I easily managed to compile my own
> >OCI (Oracle from C) programs with MSVC (by the way: C
> >plugins, too).
>
> A .so is a .dll. They're compiled basically the same way, just remember to
> export the Init_* functions. (Or for qnd jobs, export all functions, you
> can always optimize later). If you have the time, you might want to give
> the file "rbconfig.rb" a read, pretty much everything the extension
> configuration scripts use is there.

Phew, I had to edit all the source files and put the
variable declarations in front of the statements.

Now it compiles and works great. Thank you!

> You might try switching to a cygwin or mingw build of ruby
> if you plan to use extensions a lot.

That will be the next step ...

Bertram

--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...


David Vallner

1/16/2006 7:24:00 PM

0

On Mon, 16 Jan 2006 19:19:19 +0100, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:

> Hi,
>
> Am Sonntag, 15. Jan 2006, 04:05:56 +0900 schrieb David Vallner:
>> On Sat, 14 Jan 2006 17:38:19 +0100, Bertram Scharpf
>> <lists@bertram-scharpf.de> wrote:
>>
>> >in my company we use Oracle and Windows :-(.
>> >
>> >I'm afraid, I don't succeed to compile the
>> ><http://ruby9i.sourceforg... library at all. I get loads
>> >of errors the more I try. I easily managed to compile my own
>> >OCI (Oracle from C) programs with MSVC (by the way: C
>> >plugins, too).
>>
>> A .so is a .dll. They're compiled basically the same way, just remember
>> to
>> export the Init_* functions. (Or for qnd jobs, export all functions, you
>> can always optimize later). If you have the time, you might want to give
>> the file "rbconfig.rb" a read, pretty much everything the extension
>> configuration scripts use is there.
>
> Phew, I had to edit all the source files and put the
> variable declarations in front of the statements.

Oh dear. Someone dared to forget to code in that bleeding-edge
experimental new shiny C99 </sarcasm>.

Arguably the thing I hated most about C. *mutters about Borland Turbo C
colleges*

>
> Now it compiles and works great. Thank you!
>

Hoolay! If that was all that was needed, you're lucky, I can't get even
"nonsense" like iconv and fastcgi to build out of the box.

David Vallner