net/https package for Windows

  • Thread starter Joaquin Cuenca Abela
  • Start date
J

Joaquin Cuenca Abela

Hi!

I'm just starting to play with ruby, and doing a toy application I
wanted to use the net/https module.

If I try to execute the program:

require 'net/https'
http = Net::HTTP.new('www.cise.ufl.edu', 443)
http.use_ssl = true
http.get2("/") { |r| p r.body }

I get "in `require': No such file to load -- net/https (LoadError)".

I interpret that as "you don't have the net/https module".
Does anybody know where can I find this module for windows? (I installed
the "One-Click Ruby Installer")

I've googled around a bit, but it seems that the ossl package has being
integrated in ruby long ago, so I don't know if net/https is supposed to
work out-of-the-box.

I'm sorry if this "installation" question doesn't suit this newsgroup.
If so, please just refer to the right mailing list or newsgroup (if any
:) ).

Cheers,
 
L

Lennon Day-Reynolds

Joaquin,

The "one-click installer" is indeed missing the OpenSSL libraries,
which provide (among other things) the 'net/https' module you're
trying to use.

I have a binary package which I could send you as a ZIP file; it just
includes the libraries as distributed in the mingw windows binaries at
http://ftp.ruby-lang.org/pub/ruby/binaries/mingw/.
 
J

Joaquin CUENCA ABELA

Lennon Day-Reynolds said:
Joaquin,

The "one-click installer" is indeed missing the OpenSSL libraries,
which provide (among other things) the 'net/https' module you're
trying to use.

I have a binary package which I could send you as a ZIP file; it just
includes the libraries as distributed in the mingw windows binaries at
http://ftp.ruby-lang.org/pub/ruby/binaries/mingw/.

Thank you, it will be much appreciated.

Just to know how to do it for the next time, is it enough to copy the .so
from the mingw distribution, rename it as .dll and put it in a folder where
ruby will find it, and copy the related .rb files?

Thank you for your help!

Cheers,
 
S

Stephan Kämper

Hi,
Joaquin said:
Just to know how to do it for the next time, is it enough to copy the .so
from the mingw distribution, rename it as .dll and put it in a folder where
ruby will find it, and copy the related .rb files?

I once built something else with MinGW, and as far as I remember
renaming the .so file to .dll wasn't neccessary.


Happy rubying

Stephan
 
N

nobu.nokada

Hi,

At Wed, 8 Sep 2004 16:40:06 +0900,
Stephan Kämper wrote in [ruby-talk:111829]:
I once built something else with MinGW, and as far as I remember
renaming the .so file to .dll wasn't neccessary.

It is not only unnecessary, but wrong, don't rename .so as
dll. It's an obsolete feature that "require" searches .dll
files, because it often introduced confusions.
 
C

Carl Youngblood

Any word on when openssl will be available in the one-click windows
installer? This seems like an important library to have.
 
S

Stephan Kämper

Carl said:
Any word on when openssl will be available in the one-click windows
installer? This seems like an important library to have.

Here's my vote for integrating it into the 1CWI.

Happy rubying

Stephan
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top