[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Mechanize failure

Alex Young

2/21/2007 1:41:00 PM

Hi all,

Does anybody recognise this?

$ gem check -t mechanize
ERROR: While executing gem ... (NameError)
method `use_ssl?' not defined in Net::HTTP

This is on a Debian system, so I've probably forgotten an apt-get
install somewhere, but I can't spot which one:

$ dpkg -l | grep ruby
ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
ii libruby1.8 1.8.2-7sarge5 Libraries necessary to run Ruby 1.8
ii rdoc 1.8.2-1 Generate documentation from ruby
source file
ii ruby 1.8.2-1 An interpreter of object-oriented
scripting
ii ruby1.8 1.8.2-7sarge5 Interpreter of object-oriented
scripting lan
ii ruby1.8-dev 1.8.2-7sarge5 Header files for compiling extension
modules

--
Alex

9 Answers

Gregory Seidman

2/21/2007 1:48:00 PM

0

On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
> Hi all,
>
> Does anybody recognise this?
>
> $ gem check -t mechanize
> ERROR: While executing gem ... (NameError)
> method `use_ssl?' not defined in Net::HTTP
>
> This is on a Debian system, so I've probably forgotten an apt-get
> install somewhere, but I can't spot which one:
>
> $ dpkg -l | grep ruby
> ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
> ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
[...]

You're cut off there for some reason, but you should make sure you have
libopenssl-ruby1.8 installed, not just libopenssl-ruby.

> Alex
--Greg


Alex Young

2/21/2007 1:54:00 PM

0

Gregory Seidman wrote:
> On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
>
>> Hi all,
>>
>> Does anybody recognise this?
>>
>> $ gem check -t mechanize
>> ERROR: While executing gem ... (NameError)
>> method `use_ssl?' not defined in Net::HTTP
>>
>> This is on a Debian system, so I've probably forgotten an apt-get
>> install somewhere, but I can't spot which one:
>>
>> $ dpkg -l | grep ruby
>> ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
>> ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
>>
> [...]
>
> You're cut off there for some reason, but you should make sure you have
> libopenssl-ruby1.8 installed, not just libopenssl-ruby.
>
Ah. Thanks. Any idea what the difference between the two is, and when
you'd want one rather than the other?

--
Alex


Alex Young

2/21/2007 1:57:00 PM

0

Gregory Seidman wrote:
> On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
>
>> Hi all,
>>
>> Does anybody recognise this?
>>
>> $ gem check -t mechanize
>> ERROR: While executing gem ... (NameError)
>> method `use_ssl?' not defined in Net::HTTP
>>
>> This is on a Debian system, so I've probably forgotten an apt-get
>> install somewhere, but I can't spot which one:
>>
>> $ dpkg -l | grep ruby
>> ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
>> ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
>>
> [...]
>
> You're cut off there for some reason, but you should make sure you have
> libopenssl-ruby1.8 installed, not just libopenssl-ruby.
>
That doesn't seem to be the issue:

$ sudo apt-get install libopenssl-ruby1.8 libopenssl-ruby
Reading Package Lists... Done
Building Dependency Tree... Done
libopenssl-ruby1.8 is already the newest version.
libopenssl-ruby is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo gem check -t mechanize
ERROR: While executing gem ... (NameError)
method `use_ssl?' not defined in Net::HTTP


--
Alex

Gregory Seidman

2/21/2007 1:58:00 PM

0

On Wed, Feb 21, 2007 at 10:54:01PM +0900, Alex Young wrote:
> Gregory Seidman wrote:
> >On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
> >
> >>Hi all,
> >>
> >>Does anybody recognise this?
> >>
> >>$ gem check -t mechanize
> >>ERROR: While executing gem ... (NameError)
> >> method `use_ssl?' not defined in Net::HTTP
> >>
> >>This is on a Debian system, so I've probably forgotten an apt-get
> >>install somewhere, but I can't spot which one:
> >>
> >>$ dpkg -l | grep ruby
> >>ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
> >>ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
> >>
> >[...]
> >
> >You're cut off there for some reason, but you should make sure you have
> >libopenssl-ruby1.8 installed, not just libopenssl-ruby.
> >
> Ah. Thanks. Any idea what the difference between the two is, and when
> you'd want one rather than the other?

Compare:

apt-cache policy libopenssl-ruby
apt-cache policy libopenssl-ruby1.8

It looks like libopenssl-ruby is targeted at ruby 1.8.2.

> Alex
--Greg


Gregory Seidman

2/21/2007 2:09:00 PM

0

On Wed, Feb 21, 2007 at 10:57:04PM +0900, Alex Young wrote:
> Gregory Seidman wrote:
> >On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
> >
> >>Hi all,
> >>
> >>Does anybody recognise this?
> >>
> >>$ gem check -t mechanize
> >>ERROR: While executing gem ... (NameError)
> >> method `use_ssl?' not defined in Net::HTTP
> >>
> >>This is on a Debian system, so I've probably forgotten an apt-get
> >>install somewhere, but I can't spot which one:
> >>
> >>$ dpkg -l | grep ruby
> >>ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
> >>ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
> >>
> >[...]
> >
> >You're cut off there for some reason, but you should make sure you have
> >libopenssl-ruby1.8 installed, not just libopenssl-ruby.
> >
> That doesn't seem to be the issue:
>
> $ sudo apt-get install libopenssl-ruby1.8 libopenssl-ruby
> Reading Package Lists... Done
> Building Dependency Tree... Done
> libopenssl-ruby1.8 is already the newest version.
> libopenssl-ruby is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> $ sudo gem check -t mechanize
> ERROR: While executing gem ... (NameError)
> method `use_ssl?' not defined in Net::HTTP

Well, it was a thought. Trying it on my Debian box, I find that I can
install mechanize and it seems to work okay, but sudo gem check -t
mechanize produces:

/test/test_includes.rb:5: warning: already initialized constant BASE_DIR
/test/test_includes.rb:32: warning: already initialized constant SERVLETS
/test/test_includes.rb:35: warning: already initialized constant PAGE_CACHE
/test/test_includes.rb:110: warning: already initialized constant PORT
/test/test_includes.rb:111: warning: already initialized constant PROXYPORT
/test/test_includes.rb:112: warning: already initialized constant SSLPORT
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- test/htdocs/alt_text.html (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `unit_test'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `unit_test'
from /usr/local/lib/site_ruby/1.8/rubygems/gem_commands.rb:680:in `execute'
from /usr/local/lib/site_ruby/1.8/rubygems/command.rb:70:in `invoke'
from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:120:in `process_args'
from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:91:in `run'
from /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:30:in `run'
from /usr/local/bin/gem:17

...so at least I get a different error. It's possible that there is some
assumption about where I have RubyGems installed (/usr/local) that's
causing a problem. Here's my system:

% dpkg -l '*ruby*' | grep ii
ii libopenssl-ruby 1.0.0+ruby1.8.2-1 OpenSSL interface for Ruby
ii libopenssl-ruby1.8 1.8.5-3 OpenSSL interface for Ruby 1.8
ii libreadline-ruby1.8 1.8.5-3 Readline interface for Ruby 1.8
ii librmagick-ruby 1.13.0-1 ImageMagick API for Ruby
ii librmagick-ruby1.8 1.13.0-1 ImageMagick API for Ruby
ii libruby1.8 1.8.5-3 Libraries necessary to run Ruby 1.8
ii postgresql-8.1-plruby 0.5.0-1 Ruby procedural language for PostgreSQL
ii ruby 1.8.2-1 An interpreter of object-oriented scripting
ii ruby1.8 1.8.5-3 Interpreter of object-oriented scripting lan
ii ruby1.8-dev 1.8.5-3 Header files for compiling extension modules

> Alex
--Greg


Vincent Fourmond

2/21/2007 2:43:00 PM

0

Gregory Seidman wrote:
> On Wed, Feb 21, 2007 at 10:54:01PM +0900, Alex Young wrote:
>> Gregory Seidman wrote:
>>> On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
>>>
>>>> Hi all,
>>>>
>>>> Does anybody recognise this?
>>>>
>>>> $ gem check -t mechanize
>>>> ERROR: While executing gem ... (NameError)
>>>> method `use_ssl?' not defined in Net::HTTP
>>>>
>>>> This is on a Debian system, so I've probably forgotten an apt-get
>>>> install somewhere, but I can't spot which one:
>>>>
>>>> $ dpkg -l | grep ruby
>>>> ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
>>>> ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
>>>>
>>> [...]
>>>
>>> You're cut off there for some reason, but you should make sure you have
>>> libopenssl-ruby1.8 installed, not just libopenssl-ruby.
>>>
>> Ah. Thanks. Any idea what the difference between the two is, and when
>> you'd want one rather than the other?
>
> Compare:
>
> apt-cache policy libopenssl-ruby
> apt-cache policy libopenssl-ruby1.8
>
> It looks like libopenssl-ruby is targeted at ruby 1.8.2.

Just for information, debian packages work this way: for each ruby
thing packaged for debian, there are (at least) two packages a
lib...-ruby and a lib...ruby1.8. The former is empty and depends on the
latter and is there to make the transition to newer versions of ruby
more easy (for the maintainers). packagers can also choose to provide a
-ruby1.9 version. (this is not true for all packages, but for the
greatest majority).

Vince, waiting to get upload rights to the debian archive...

--
Vincent Fourmond, PhD student (not for long anymore)
http://vincent.fourmon...
https://nm.debian.org/nmstatus.php?email=vincent.fourmond%40...

Ken Bloom

2/21/2007 3:08:00 PM

0

On Wed, 21 Feb 2007 22:58:08 +0900, Gregory Seidman wrote:

> On Wed, Feb 21, 2007 at 10:54:01PM +0900, Alex Young wrote:
>> Gregory Seidman wrote:
>> >On Wed, Feb 21, 2007 at 10:41:17PM +0900, Alex Young wrote:
>> >
>> >>Hi all,
>> >>
>> >>Does anybody recognise this?
>> >>
>> >>$ gem check -t mechanize
>> >>ERROR: While executing gem ... (NameError)
>> >> method `use_ssl?' not defined in Net::HTTP
>> >>
>> >>This is on a Debian system, so I've probably forgotten an apt-get
>> >>install somewhere, but I can't spot which one:
>> >>
>> >>$ dpkg -l | grep ruby
>> >>ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
>> >>ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
>> >>
>> >[...]
>> >
>> >You're cut off there for some reason, but you should make sure you have
>> >libopenssl-ruby1.8 installed, not just libopenssl-ruby.
>> >
>> Ah. Thanks. Any idea what the difference between the two is, and when
>> you'd want one rather than the other?
>
> Compare:
>
> apt-cache policy libopenssl-ruby
> apt-cache policy libopenssl-ruby1.8
>
> It looks like libopenssl-ruby is targeted at ruby 1.8.2.

Wrong!

libopenssl-ruby is simply a dummy package designed to install the
appropriate version of the package for the appropriate version of the
interpreter. By installing ruby, you get ruby 1.8 pulled in as a dependancy
(as opposed to ruby 1.9). Likewise, by installing libopenssl-ruby, you get
libopenssl-ruby1.8 as opposed to 1.9. One day when 2.0 becomes the new
stable, you'll be upgraded to ruby2.0 and libopenssl-ruby2.0 automatically
because they'll be the new dependancies for the dummy package.

Package: libopenssl-ruby
[snip part of the description]
Description: OpenSSL interface for Ruby
This package makes Ruby to be able to use OpenSSL. It includes HTTP and
TELNET protocols' SSL/TLS support.
.
This package is a dependency package, which depends on Debian's default
Ruby version (currently 1.8.x).


--
Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu...

Heinrich

2/24/2013 10:25:00 AM

0



"NoSpamAtAll" schreef in bericht news:kgcppf$k4h$1@pcls6.std.com...

In article <nzlWs.149040$uU.45116@newsfe11.iad>,
Heinrich <Heinrich@Ruhrgasnet.de> wrote:

[...]

Why did you murder Polly, pigshit?

drop dead boring horse dick

tricia.brumant

2/24/2013 10:27:00 AM

0

> come over and do some researcch yourself

I'll do the research. Where do you live?