Compile Ruby9i on Windows

B

Bertram Scharpf

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.sourceforge.net/> 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
 
D

Daniel Berger

Bertram said:
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.sourceforge.net/> 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
 
D

David Vallner

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.sourceforge.net/> 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 t=
o =20
export the Init_* functions. (Or for qnd jobs, export all functions, you =
=20
can always optimize later). If you have the time, you might want to give =
=20
the file "rbconfig.rb" a read, pretty much everything the extension =20
configuration scripts use is there.

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

David Vallner
 
W

Wilson Bilkovich

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.sourceforge.net/> 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/ruby-oci8/
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.
 
B

Bertram Scharpf

Hi,

Am Sonntag, 15. Jan 2006, 04:05:56 +0900 schrieb David Vallner:
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
 
D

David Vallner

Hi,

Am Sonntag, 15. Jan 2006, 04:05:56 +0900 schrieb David Vallner:

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 =20
experimental new shiny C99 </sarcasm>.

Arguably the thing I hated most about C. *mutters about Borland Turbo C =20
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 =20
"nonsense" like iconv and fastcgi to build out of the box.

David Vallner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top